code stringlengths 2 1.05M |
|---|
// @flow
import type { ReadableWritable } from "./streams";
import { ReadableStream } from "./streams";
import { _merge } from "./merge";
import pipe from "./pipe";
/**
* This function takes one or more streams and returns a readable combining
* the streams such that it gathers chunks from all streams by applying... |
version https://git-lfs.github.com/spec/v1
oid sha256:be0e7d026901d6049f29086048a7f98174f35cab73dd2b42c71db7cbf44f48ea
size 11351
|
import 'kuromoji'
import {select} from './select.js'
import {setForViz} from './vizFlowBarChart.js'
export const makeOnClick = (c) => {
document.getElementById('b' + c).onclick = () => {
const id = 'r' + c
document.getElementById(id).classList.toggle('hide')
}
}
export const makeOnClickS = (c) => {
docume... |
'use strict';
var shimmer = require('../../util/shimmer')
, logger = require('../../util/logger').child('parsers.wrappers.pg')
, parseSql = require('../db/parse-sql')
, CallStack= require('../../util/stack')
;
function get_sql(param) {
if (param && (typeof param === 'string' || param insta... |
const { spawnSync } = require('child_process')
const os = require('os')
const versions = require('../sqe-manifest.json')
/**
* See: https://stackoverflow.com/questions/13696148/node-js-create-folder-or-use-existing
*/
const mkdirSync = (dirPath) => {
try {
fs.mkdirSync(dirPath)
} catch (err) {
if (err.cod... |
define([
'./client.service',
'./helper.service',
'./data-source.service',
'./auth/token.component',
'@shared/data-source',
'@shared/alt-auth',
], function(FecruApiClientFactory, FecruHelperFactory, FecruDataSourceFactory, fecruAuthTokenComponent) {
return {
init: function(module) {
... |
import React from 'react'
import PropTypes from 'prop-types'
import Util from 'client/util'
const ChatMessage = ({message, onClick, onDeleteClick}) => {
const statusBackgroundColor = (status) => {
if(status==='creating'){
return '#90afe5'
}else if(status==='deleting'){
return '#ff0000'
}
return '#fffce... |
import React, {Component} from 'react';
import {connect} from 'react-redux';
import Text from './Text';
import {logText, addText, readText, editText, removeTodo, removeAllTexts} from './components/actions/actions';
class Todo extends Component {
constructor(){
super();
this.addTextToList = this.addTextToList.bind... |
Boom.AmbientLightComponent = function( params ) {
params = params || {};
this.type = params.type || Boom.Constants.Component.TYPE.LIGHT;
this.color = params.color || 0xFFFFFF;
//Call super
Boom.Component.call(this, params );
};
Boom.AmbientLightComponent.prototype = Boom.inherit(Boom.Component, {
construc... |
/*
* @author Daisuke Homma
*/
new function() { // block
an.ColorStock = function() {
this.stock = [];
this.selected = 0;
this.MaxLength = 14;
an.g.ColorStock = this;
}
var self = an.ColorStock;
self.prototype.storeColor = function(color) {
for(var i = 0; i < this.stock.length; i++) {
var stocked... |
// nanobus.js
// Event bus implementation
nanobus = function() {
// Key : handler[] map
var listeners = {};
// Register the given handler for the given key
// @param key any non-null string, or an array of non-null strings
// @param handler a callback that takes a key and value,or an array of callbacks
// @retu... |
import { POST_MESSAGE, RECEIVE_MESSAGE, CONNECT, DISCONNECT } from '../constants/ActionTypes';
export function connect() {
return {
type: CONNECT
}
}
export function disconnect() {
return {
type: DISCONNECT
}
}
export function receiveMessage(message){
return {
type: RECEIVE_MESSAGE,
message... |
/**
* ViewContext
* @class
* @constructor
* @param {yak.ui.ViewContext} viewContext
* @param {yak.ui.ViewModelContext} viewModelContext
*/
yak.ui.ViewFactory = function ViewFactory(viewContext, viewModelContext) {
'use strict';
/**
* Preserve instance.
* @type {yak.ui.ViewFactory}
*/
v... |
/**
* Wheel, copyright (c) 2020 - present by Arno van der Vegt
* Distributed under an MIT license: https://arnovandervegt.github.io/wheel/license.txt
**/
const path = require('../../../../shared/lib/path');
const dispatcher = require('../../../lib/dispatcher').dispatcher;
const sourceBuilderUtil... |
angular
.module('NashMatch')
.config(function($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'app/map/map.html',
controller: 'MapCtrl',
controllerAs: 'home'
})
});
|
// replace "toner" here with "terrain" or "watercolor", or
// "toner-lite"
var layer = new L.StamenTileLayer("toner-lite");
var lat = 41.88362062793376,
lon = -87.64411926269531; // the coordinates of Chicago
var map = new L.Map("map", {
center: new L.LatLng(lat,lon),
zoom: 12,
minZoom: 11,
maxZoo... |
"use strict";
var $__view__;
var $__0 = ($__view__ = require("./view"), $__view__ && $__view__.__esModule && $__view__ || {default: $__view__}),
toNextIdentifier = $__0.toNextIdentifier,
toPrevIdentifier = $__0.toPrevIdentifier,
selectAllIdentifiers = $__0.selectAllIdentifiers,
toDefinition = $__0.toDef... |
'use strict';
const { Transform } = require('stream');
const mongoose = require('mongoose');
const stringify = new Transform({
objectMode: true,
transform(chunk, encoding, callback) {
this.push(JSON.stringify(chunk));
callback();
},
});
mongoose.connect('mongodb://localhost/school-wallet', { useMongoCl... |
import $ from 'jquery';
import { Progress } from '@wq/progress';
// Active progress instances
var _timers = {};
export function run($page) {
var $progress = $page.find('progress'),
$status;
if (!$progress.length) {
return;
}
if ($progress.data('wq-status')) {
$status = $page.f... |
// Generated by CoffeeScript 1.4.0
/*
#
# Opentip v2.2.3
#
# More info at [www.opentip.org](http://www.opentip.org)
#
# Copyright (c) 2012, Matias Meno
# Graphics by Tjandra Mayerhold
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation fil... |
AccountsTemplates.configure({
// Behaviour
confirmPassword: false,
enablePasswordChange: false,
forbidClientAccountCreation: true,
overrideLoginErrors: true,
sendVerificationEmail: false,
// Appearance
showAddRemoveServices: false,
showForgotPasswordLink: false,
showLabels: true,
showPlaceholders: true,
/... |
/*! jQuery UI - v1.10.4 - 2014-03-04
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.effect-drop.js, jquery.ui.effect-fade.js, jquery.ui.effect-slide.js
* Copyright 2014 jQuery Foundation and other... |
#! /usr/bin/env node
var program = require('commander');
var fs = require('fs');
var miniquery = require('../src');
program
.usage('[options] <query> <file ...>')
.option('-V, --V', 'return the current miniquery version')
.option('-v, --verbose', 'tell me everything!')
.option('-j, --json', 'output JSON')
.... |
module.exports = {
"extends": "airbnb-base",
"globals": {
"fetch": true,
"document": true,
"window": true
},
"parser": "babel-eslint",
"parserOptions": {
"allowImportExportEverywhere": true
}
};
|
(function() {
'use strict';
angular
.module('falconcmsApp')
.factory('translationHandler', translationHandler);
translationHandler.$inject = ['$rootScope', '$window', '$state', '$translate'];
function translationHandler($rootScope, $window, $state, $translate) {
return {
... |
import React from 'react';
import renderer from 'react-test-renderer';
import Button from '../../../src/components/form/Button.js'
import {shallow, configure} from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({adapter: new Adapter()});
it('renders Button correctly', () => {
const tree = rende... |
'use strict';
System.register(['./controllers/NegociacaoController'], function (_export, _context) {
"use strict";
var currentInstance, negociacaoController;
return {
setters: [function (_controllersNegociacaoController) {
currentInstance = _controllersNegociacaoController.currentInstance;
}],
... |
require('dotenv').config()
const path = require('path')
const Webpack = require('webpack')
const nodeExternals = require('webpack-node-externals')
const postcssConfig = require('./postcss.config')
const nodeModulesPath = path.resolve(__dirname, 'node_modules')
const sourcePath = path.resolve(__dirname, 'src')
const... |
import { breakpoints, containerWidth } from './variables'
const container = Object.keys(breakpoints).map(bp => `
@media (min-width: ${breakpoints[bp]}px) {
.ctn {
width: ${containerWidth[bp]}px;
}
}
`).reduce((a, b) => `${a}${b}`)
export default `
.ctn {
width: 100%;
margin-left: auto;
margin-right: a... |
// Global modules
global.async = require('async');
require(__dirname + '/mixpanel');
require(__dirname + '/connections');
//var lolrmtp = require('./lolrmtp/main').client;
var api = require(__dirname + '/api');
var express = require('express');
// Constructs modules
global.app... |
<% if @debug %>
function xinspect(o,i){
if(typeof i=='undefined')i='';
if(i.length>50)return '[MAX ITERATIONS]';
var r=[];
for(var p in o){
var t=typeof o[p];
r.push(i+'"'+p+'" ('+t+') => '+(t=='object' ? 'object:'+xinspect(o[p],i+' ') : o[p]+''));
}
return r.j... |
/**
* Created by anonymous on 26/12/15 23:58.
*/
(function() {
'use strict';
angular
.module('flexiList')
.directive('crudTable', crudTable);
crudTable.$inject = [];
/* @ngInject */
function crudTable() {
var directive = {
//bindToController: true,
... |
'use strict'
import React from 'react'
import ReactDOM from 'react-dom'
import {Router, Route} from 'react-router'
import HomePageBtn from './homePageBtn'
import Header from './header'
import CommentPage from './commentPage'
function parentAccess () {
console.log ('grant parent access')
}
function goToAskPage(){
... |
(function(exports) {
var tests = [];
exports.test = function(code, ast, options) {
tests.push({code: code, ast: ast, options: options});
};
exports.testFail = function(code, message, options) {
tests.push({code: code, error: message, options: options});
};
exports.testAssert = function(code, assert... |
var { AotPlugin } = require('@ngtools/webpack');
function getAotPlugin() {
let aotPlugin = new AotPlugin({
tsConfigPath: './ClientApp/tsconfig.json',
skipCodeGeneration: false
});
aotPlugin._compilerHost._resolve = function (pathToResolve) {
var path1 = require("path");
pathToResolve = aotPl... |
var ws;
function sendEvent( evt ) {
for(var i=0; i < arguments.length; i++)
ws.send(arguments[i]);
ws.send("___ENDOFMESSAGE___")
}
var idSession = "__empty__";
var stateSession = 0; //0 -> init | 1 -> running
function createWS() {
var loc = window.location;
var uri = 'ws:';
if (loc.protocol === 'http... |
// client side angular router paths
angular.module('myApp', ["myApp.controllers"])
.config(function($routeProvider) {
$routeProvider.
// default route
when('/', {
templateUrl: 'views/index.html'
}).
// route for login page
when('/login', {
... |
'use strict';
// private database
var database = [
{
id: 'HOTEL1',
name: 'Kevins Hotel',
type: 'hotel',
latitude: 51.26895,
longitude: -0.52112
},
{
id: 'HOTEL2',
name: 'Emilys Hotel',
type: 'hotel',
latitude: 52.26895,
longitude: -0.53112
},
{
id: 'HOTEL3',
na... |
var mongoose = require('mongoose');
var reports = require('./reports');
var tests = require('./tests');
var users = require('./users');
var certificates = require('./certificates');
var connection = mongoose.connection;
//connection check
connection.on('open', function() {
console.log('Connection to DB created')... |
// Other helpers
function Console() {
this.log = function( s ) {
consoleLog( s );
}
}
console = new Console();
log = console.log;
function Module() {
this.exports = function() {
// empty, but replaced later on
}
}
module = new Module();
function getStubByDeviceIdParam( device_id_p... |
import moment from 'moment'
import { tourType, tourTypeTextMap } from '@/constants/tourType'
export const tourNameDisplay = tour => {
return `${tour.code} - ${tour.name}`
}
export const scheduleDateDisplay = schedule => {
return moment(schedule.startDate).format('YYYY-MM-DD')
}
export const isSingleDayTourType =... |
import { p as makeMove, g as gameEvent, q as alea } from './turn-order-53298974.js';
import { C as CreateGameReducer } from './reducer-40ee59c5.js';
/*
* Copyright 2018 The boardgame.io Authors
*
* Use of this source code is governed by a MIT-style
* license that can be found in the LICENSE file or at
* http... |
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
'node_modules/core-js/client/shim.js',
'node_modules/document-register-element/build/document-register-element.js', // jshint ignore:line
{ pattern: 'test/**/*.js', watched: false }
],
... |
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
const _excluded = ["center", "classes", "className"];
import * as React from 'react';
import PropTypes from 'prop-types';
import { TransitionGroup } from 'react... |
!function(n,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():n.nuWindow=e()}(this,function(){var n=window._,e=function(e,t,o){var i={width:520,height:350};o=n.defaults(i,o);var r={left:screen.width/2-o.width/2,top:screen.height/2-o.height/2};o=n.extend(o,r);var c=[];o&&n... |
const Giphy = require('giphy');
const config = require('./../config');
const giphy = new Giphy(config.giphyToken);
function gifSearch(query) {
return new Promise((resolve, reject) => {
giphy.search({ q: query }, (err, test) => {
// If there is an error reject the promise
if (err) {
reject(err)... |
'use strict';
/* ___ ___ ___
* /\ \ /\ \ /\ \ ___
* \:\ \ /::\ \ /::\ \ /\ \
* ___ /::\__\ /:/\:\ \ /:/\:\ \ \:\ \
* /\ /:/\/__/ /::\~\:\ \ /:/ \:\__\ /::\__\
* \:\/:/ / /:/\:\ \... |
import angular from 'angular';
// object modules
import {usersModule} from './app/users/index';
import {listingsModule} from './app/listings/index';
import {bookingsModule} from './app/bookings/index';
import {confirmationsModule} from './app/confirmations/index';
import {directionsModule} from './app/directions/index... |
import css from "./a.css";
console.log(css);
import("./c.js").then(console.log);
|
import WbOption from '../select/option.vue';
export default WbOption
|
'use strict';
tripExchangeApp.factory('auth', ['$http', '$q', 'identity', 'authorization', 'baseServiceUrl', function ($http, $q, identity, authorization, baseServiceUrl) {
var usersApi = baseServiceUrl + '/api/users'
return {
signup: function(user) {
var deferred = $q.defer();
... |
// global for the sake of this example
var Companies = new CompanyList();
var App = null;
/**
* The App
* Our overall **AppView** is the top-level piece of UI.
*/
var AppView = Backbone.View.extend({
el: $("#hub"),
//--------------------------------------
// Event wiring (events and event handlers)
... |
/**
* Creates a new qlearner
*
* @constructor
* @param {Player} _player the Player this QLearner is associated to
* @todo wire up options
* @author Christian Vogt <mail@christianvogt.de>
*/
function QLearner(_player) {
checkInstance(_player, Player);
this.player = _player;
this.stateTable = {};
... |
var React = require('react');
var Router = require('react-router');
var RouteHandler = Router.RouteHandler;
var SettingsStore = require('../../stores/SettingsStore.js');
var SettingsActions = require('../../actions/SettingsActions.js');
var OpenGames = require('../games/OpenGames.react.js');
var PlayerGames = require(... |
const getters = {
alert(state) {
return state.alert;
},
modal(state) {
return state.modal;
},
user(state) {
return state.user;
},
lang(state) {
return state.lang;
}
}
export default getters;
|
import isFunction from 'lodash/lang/isFunction';
import forOwn from 'lodash/object/forOwn';
import bind from 'lodash/function/bind';
export default function noteWrapper(...args) {
return function noteDecorator(...properties) {
return noteMethod(...properties, ...args);
};
}
function noteMethod(target, name, d... |
search_result['56']=["topic_0000000000000014_props--.html","DummyController Properties",""]; |
cm.define('Com.AbstractContainer', {
'extend' : 'Com.AbstractController',
'events' : [
'onOpen',
'onOpenEnd',
'onClose',
'onOpenPlaceholder',
'onOpenPlaceholderEnd',
'onClosePlaceholder',
'onRenderControllerStart',
'onRenderControllerProcess',
... |
var tableHelpers = {};
tableHelpers.limitToUserId = function(context) {
var userId = '';
if (!!context.user) {
userId = context.user.id || '';
}
// WHERE ... AND userId = 42
context.query.where({ userId: userId });
return context.execute();
};
tableHelpers.setUserId = function(context... |
import utils from './utils';
class FullScreen {
constructor (player) {
this.player = player;
this.player.events.on('webfullscreen', () => {
this.player.resize();
});
this.player.events.on('webfullscreen_cancel', () => {
this.player.resize();
});
... |
(function() {
/*!
* @overview Ember - JavaScript Application Framework
* @copyright Copyright 2011-2021 Tilde Inc. and contributors
* Portions Copyright 2006-2011 Strobe Inc.
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
* @license Licensed under MIT license
* ... |
const secrets = {
'token': '<your_mlab_token_here>'
};
export default secrets;
|
/*!
* Datepicker for Bootstrap v1.5.0 (https://github.com/eternicode/bootstrap-datepicker)
*
* Copyright 2012 Stefan Petre
* Improvements by Andrew Rowls
* Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
*/(function(factory){
if (typeof define === "function" && define.amd) {
... |
importPackage(org.silabsoft.runeagent.transformer);
importPackage(org.silabsoft.runeagent.util);
var transformer = new RuneTekFourTransformer(runeAgent.getAgent());
var byteStream = new ClassModifier("ByteStream", "Stream", "org.silabsoft.runeagent.hook.GenericByteStream");
byteStream.addMethodWrapper(new MethodWrapper... |
describe('ng.soda.resource.factory', function() {
'use strict';
var $q,
$timeout,
ResourceFactory,
handlers = {
success: angular.noop,
error: angular.noop,
},
mocks = {
promise: {
flag: {
... |
'use strict';
/* Assignment #1 End-to-End Testing
* Prepared By: Len Payne
* For: CPD-3262
* 2014/01/07
*/
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
describe('Contact List App', function() {
beforeEach(function() {
browser().navigateTo('app/index.html');
});
it('should have four tr e... |
var DKApp = {
request: function(method, params, successCallback){
$.ajax({
url: 'service.php',
data: JSON.stringify({jsonrpc:'2.0',method:method, params:params, id:"jsonrpc"}),
type:"POST",
dataType:"json",
success: function(data){ successCallbac... |
'use strict';
/**
* Module dependencies.
*/
var acl = require('acl');
var path = require('path');
var oauth2Service = require('../../../users/server/services/oauth2.server.service.js');
var errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller'));
var mongoose = require('mon... |
search_result['4283']=["topic_0000000000000A34_methods--.html","PaymentMethodDto Methods",""]; |
// Express application adding the router to expose Core Services
// Api routes.
var express = require('express');
var CoreService = require('libcore').CoreService;
var http = require('http');
if (!process.env.DATABASE_URI) {
console.log("DATABASE_URI not specified, falling back to localhost");
}
var api = new Cor... |
const _ = require('underscore');
const BaseStepWithPipeline = require('./basestepwithpipeline.js');
const SimpleStep = require('./simplestep.js');
const InitiateCardAbilityEvent = require('../Events/InitiateCardAbilityEvent');
const InitiateAbilityEventWindow = require('../Events/InitiateAbilityEventWindow');
const { ... |
/* eslint-env node */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
sassOptions: {
extension: 'scss'
}
});
/*
This build file specifies the options for the dummy test app of this
addon, located in... |
var searchData=
[
['illegalargumentexception',['IllegalArgumentException',['/home/shannaracat/dev/gitlab/workspace_oss/LostInCompilation/docs/doxygen/shacat/html/classIllegalArgumentException.html',1,'']]],
['illegalstateexception',['IllegalStateException',['/home/shannaracat/dev/gitlab/workspace_oss/LostInCompilat... |
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
const Key = forwardRef(({ color = 'currentColor', size = 24, ...rest }, ref) => {
return (
<svg
ref={ref}
xmlns="http://www.w3.org/2000/svg"
width={size}
height={size}
viewBox="0 0 24 24"
fill="none... |
/**
* angular-closure v1.2.26 - 2014-11-02
* @link https://github.com/angularifyjs/angular-closure
* @license MIT - Copyright (c) 2014 Angularfiy.org & HenryTao.
*/
angular.module("angular-closure",[]).provider("Closure",function(){var n={extend:function(n){return n=angular.extend({},n),angular.forEach(n,function(u... |
(function($) {
$.extend({
historic: function(options) {
if (!window.history) {
console.log("HistoryScroll feature not enabled since your browser doesn't support the HTML5 History API.");
return false; // just in case browser IE9 & below being used
}
var loading = true,
s... |
var searchData=
[
['id',['id',['../classblackbone_1_1_thread.html#a3f3e23ce8c04038f078fad0f58856d86',1,'blackbone::Thread']]],
['imagebase',['imageBase',['../classblackbone_1_1pe_1_1_p_e_image.html#a9d722a849039c8ce4e271fe946f2d9b8',1,'blackbone::pe::PEImage']]],
['imagesize',['imageSize',['../classblackbone_1_1p... |
export { default as SkeletonImage } from './skeleton-image'
export { default as SkeletonText } from './skeleton-text'
export { default as SkeletonTitle } from './skeleton-title'
|
window.g_testLoadScriptViaInnerHTML = true;
KISSY.Test.echo('echo from test-dom-create.js file.'); |
/* NUGET: BEGIN LICENSE TEXT
*
* Microsoft grants you the right to use these script files for the sole
* purpose of either: (i) interacting through your browser with the Microsoft
* website or online service, subject to the applicable licensing or use
* terms; or (ii) using the files as included with a Microsoft p... |
'use strict'
/* istanbul ignore next */
var extend = Object.assign || require('util')._extend,
hasCallbackRE = /.*function.+\(.*,\s*_?(callback|cb)_?\)/
/**
* Constructor.
* @param {Function} fn Promise executor.
*/
function ThenCatch (fn) {
var p = new Promise(function (resolve, reject) {
return fn(reso... |
/* @flow */
declare module 'js-yaml' {
declare function safeLoad(yaml: string, config: {filename: string}): Object;
}
|
import request from 'request-promise';
import sek from 'sek';
import { assertion } from './sites/footy-addicts';
async function query(url) {
const html = await request({ url });
return assertion(html);
}
export default ({ url, duration }) => {
return new Promise((resolve, reject) => {
const interval = setIn... |
import { NumberSequence } from "@ag-grid-community/core";
// test code niall wrote for prototyping
var ServerSideCrudCache = /** @class */ (function () {
function ServerSideCrudCache() {
}
ServerSideCrudCache.prototype.getRowBounds = function (index) {
return null;
};
ServerSideCrudCache.pro... |
const express = require('express')
const jade = require('jade')
const app = express()
const favicon = require('serve-favicon')
app.set('view engine', 'jade')
app.set('port', process.env.PORT || 3000)
app.use(favicon(__dirname + '/favicon.ico'))
app.use(express.static(__dirname + '/static'))
app.get('/', function(req... |
'use babel'
import {React} from 'react-for-atom';
import {fromJS} from 'immutable';
import YeomanListPrompt from './YeomanListPrompt';
export default React.createClass({
render: function() {
return (
// <div className="yeoman-expand-prompt">
<YeomanListPrompt
name={this.props.name}
... |
var path = require('path');
var webpack = require('webpack');
module.exports = {
//插件项
plugins: [],
devServer: {
noInfo: false,
hot: true,
inline: true
},
//页面入口文件配置
entry: {
index: path.resolve(__dirname, './src/index.js')
},
//入口文件输出配置
output: {
... |
var
mongoose = require('mongoose'),
Dependency = require('./dependency'),
_ = require('underscore');
var Component = new mongoose.Schema({
// Component attributes
name : { type: String, required: true },
repo : { type: String, required: true, index: true, unique: true },
description : { type: String },
... |
/**
* Created by andy on 3/6/16.
*/
import React, { Component } from 'react';
import { Link } from 'react-router';
import LoginCard from '../LoginCard.react';
class LoginPage extends Component {
render() {
return (
<LoginCard />
);
}
}
export default LoginPage; |
'use strict';
module.exports = function () {
return 'This text was generated by template C';
}
|
import angular from 'angular'
import indexOf from 'indexof'
export default ['$moment', '$timeout', function inputDirective ($moment, $timeout) {
// Maybe expose a setting for localization someday...
var stepUnits = ['millisecond', 'second', 'minute', 'hour', 'day', 'month', 'year']
var strictView = $moment.$stri... |
var SpeechRecognition = SpeechRecognition || window.webkitSpeechRecognition || undefined;
var numbers = Array.apply(null, Array(101)).map(function (_, i) {return i;});
if(SpeechRecognition) {
var SpeechGrammarList = SpeechGrammarList || window.webkitSpeechGrammarList || undefined;
var SpeechRecognitionEvent = Spee... |
import React from 'react';
import TestUtils from 'react/lib/ReactTestUtils';
import StoryList from '../StoryList';
describe('StoryList', () => {
it('renders', () => {
let element = TestUtils.renderIntoDocument(<StoryList />);
expect(element).toBeTruthy();
});
}); |
var gulp = require('gulp');
var lab = require('gulp-lab');
var karma = require('gulp-karma');
var protractor = require('gulp-protractor').protractor;
var karmaFiles = require('./test/client/karma-files.json');
// Test the server code
gulp.task('test-server-specs', function () {
gulp.src([
'./app/plugins/s... |
'use strict';
// Declare app level module which depends on views, and components
angular.module('myApp', [
'ngRoute',
'myApp.version'
])
.constant('API_URL', 'http://54.200.14.217/?/')
.config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('/Search', {
templateUrl: 'app/... |
var config = {
defaultContainerElement: null,
defaultIconPack: 'mdi',
defaultIconComponent: null,
defaultIconPrev: 'chevron-left',
defaultIconNext: 'chevron-right',
defaultLocale: undefined,
defaultDialogConfirmText: null,
defaultDialogCancelText: null,
defaultSnackbarDuration: 3500,
defaultSnackbar... |
'use strict';
module.exports = function(grunt) {
// Project Configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
jade: {
files: ['app/views/**'],
options: {
livereload: true,
},
... |
/* global require, __dirname */
module.exports = function () {
'use strict';
var path = require('path');
var project = {};
project.paths = {
config: 'config/',
assets: 'assets/',
dist: 'dist/',
css: 'css/',
cssSrc: 'scss/',
cssVend: 'scss/vendor/',
... |
var server = require('karma').server,
path = require('path'),
spawn = require('child_process').spawn;
module.exports = exports = function karma(options, done) {
if (typeof options === 'function') done = options, options = undefined;
if (typeof done !== 'function') throw "karma plugin requires callback func... |
'use strict';
module.exports = {
ci: require('./generators/ci'),
config: require('./generators/config'),
lint: require('./generators/lint'),
node_version: require('./generators/node-version'),
release: require('./generators/release'),
test: require('./generators/test')
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.