code
stringlengths
2
1.05M
const window = require('global/window') const css = require('sheetify') const html = require('bel') const framework = require('./framework') const { getToken, saveToken, subscribeToken, unsubscribeToken } = require('./api') const { urlBase64ToUint8Array } = require('./util') const serviceWorkerSupported = 'serviceWork...
/** * Creates an instance of a PusherChatWidget, binds to a chat channel on the pusher instance and * and creates the UI for the chat widget. * * @param {Pusher} pusher The Pusher object used for the chat widget. * @param {Map} options A hash of key value options for the widget. */ function PusherChatWidget(pushe...
const path = require('path'); const webpack = require('webpack'); const merge = require('webpack-merge'); const pkg = require("./package.json"); const CleanWebpackPlugin = require('clean-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-p...
(function () { 'use strict'; var licensesService = function licensesService(data) { var getAll = function getAll() { return data.get('api/licenses'); }; return { getAll: getAll } } angular .module('sourceControlSystem.serv...
var logger = require('pomelo-logger').getLogger(__filename); var pomelo = require('pomelo'); //var dataApi = require('../util/dataApi'); //var Player = require('../domain/entity/player'); //var User = require('../domain/user'); //var consts = require('../consts/consts'); //var equipmentsDao = require('./equipmentsDao')...
var _ = require('lodash'); var moment = require('moment'); var MongoClient = require('mongodb').MongoClient; var CONNECT_STRING = 'mongodb://localhost:27017/travel'; /** * @param {Number} hotelId * @param {Function} */ exports.findOne = function (hotelId, callback) { if(!hotelId) return null; MongoClient.con...
import path from "path"; import fs from "fs"; import {execSync} from "child_process"; import _ from "lodash"; import yaml from "js-yaml"; import dust from "../lib"; import chalk from "chalk"; const fixtures = yaml.safeLoad(fs.readFileSync(path.join(__dirname, "./fixtures.yml"), "utf8")); process.stdout.write("removin...
/** * Created by trigkit4 on 2017/5/9. */ let util = { ajax(options,success,error){ if (typeof options === 'string') { options = { url: options } } let defaultConfig = { dataType: 'json', type: options.type || 'GET', ...
/* * Additional function for wysiwyg.html * Written by ThemePixels * http://themepixels.com/ * * Built for Katniss Premium Responsive Admin Template * http://themeforest.net/category/site-templates/admin-templates */ jQuery().ready(function() { jQuery('textarea.tinymce').tinymce({ // Location of TinyMCE...
import { module, test } from 'qunit'; import Gain from 'ember-audio/objects/gain'; import AudioService from 'ember-audio/services/audio-service'; var audioService = AudioService.create(); module('Unit | Object | gain'); test('it works', function(assert) { var subject = Gain.create(); assert.ok(subject); }); tes...
/** * Pauses test execution until the document's `readyState` property === 'complete'. */ module.exports = { 'name': 'waitForDoc', 'fn': function(options) { var _ = require('underscore'); options = options || {}; _.defaults(options, { 'timeout': 60000 }); ...
rawimage = (function(){
export default { "a":"Alfa", "b":"Bravo", "c":"Charlie", "d":"Delta", "e":"Echo", "f":"Foxtrot", "g":"Golf", "h":"Hotel", "i":"India", "j":"Juliet", "k":"Kilo", "l":"Lima", "m":"Mike", "n":"November", "ñ":"Ñoño", "o":"Oscar", "p":"Papa", "q":"Quebe...
"use strict"; (function() { GBGJ.LevelChanger = me.Entity.extend({ init: function(x, y, settings) { this._super(me.Entity, 'init', [x, y, settings]); this.body.collisionType = me.collision.types.COLLECTABLE_OBJECT; this.nextLevel = settings.nextLevel; }, update: function(dt) { me.collision.check(thi...
// Tainting works by providing a function `taint` // that adds a dynamic taint to a value. Any operations // on that tainted value propagate the taint. /** begin tainting extension code **/ // standard unary and binary operations var unaryOps = { "-": function(x) { return -x; }, "+": function(x) { ...
// @flow weak import React from 'react'; import OverridesClassNames from 'docs/src/pages/customization/OverridesClassNames'; // We can use OverridesClassNames over and over. function OverridesComponent() { return <OverridesClassNames>{'Component'}</OverridesClassNames>; } export default OverridesComponent;
import { COUNTER_INCREMENT, increment, doubleAsync, default as counterReducer } from './counter' describe('(Redux Module) Counter', () => { it('Should export a constant COUNTER_INCREMENT.', () => { expect(COUNTER_INCREMENT).to.equal('COUNTER_INCREMENT') }) describe('(Reducer)', () => { it('Shoul...
'use strict' const _ = require('lodash') const Promise = require('bluebird') const SubstanceController = require('../controllers/SubstanceController') const ActionType = require('../enums/ActionType') const commands = [ { actionType: ActionType.Krappe, allowedInterfaces: ['irc'], textCommands: ['krappe...
version https://git-lfs.github.com/spec/v1 oid sha256:2477f3df75009fbface79e9219f72c295e8a41426c5cc05e95d3a822de590d0b size 56216
// Saves options to chrome.storage function save_options() { var enable = document.getElementById('enable').checked; var block_60fps = document.getElementById('block_60fps').checked; var battery_only = document.getElementById('battery_only').checked; chrome.storage.local.set({ enable: enable, block_60fp...
describe ('Test the basic functionality of dust', function() { for (var index = 0; index < coreTests.length; index++) { for (var i = 0; i < coreTests[index].tests.length; i++) { var test = coreTests[index].tests[i]; it ('RENDER: ' + test.message, render(test)); it ('STREAM: ' + test.message, str...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var MongoDriver_1 = require("../driver/mongodb/MongoDriver"); /** * Contains all information about entity's embedded property. */ var EmbeddedMetadata = /** @class */ (function () { // ----------------------------------------------------...
var noop = function noop () {}; // HOF Wraps the native Promise API // to add take a shouldCancel promise and add // an onCancel() callback. var speculation = function speculation (fn) { // Don't cancel by default var cancel = ( arguments.length > 1 && arguments[1] !== undefined ) ? arguments[1] : Promis...
var gulp = require('gulp'); var del = require('del'); var rename = require('gulp-rename'); var merge = require('merge2'); var sass = require('gulp-sass'); var webserver = require('gulp-webserver'); var runSequence = require('run-sequence'); var concat = require('gulp-concat'); var sourcemaps = require('gulp-sourcemaps'...
// Copyright (c) 2014 Matthew Meyers. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- description: Array.prototype.find should convert thisArg into an object flags: [noStrict] ---*/ var dataTypes = [ undefined, null, true, this, {}, 'string', ...
require('coffee-script'); module.exports = require('./lib/jarvis-ha');
"use strict"; module.exports = { parser: "babel-eslint", extends: "eslint:recommended", env: { node: true }, rules: { // errors "no-console": "warn", "no-debugger": "warn", "no-empty": "warn", "no-extra-parens": "warn", "no-loss-of-precision": "warn", "no-promise-executor-r...
import { Map, List, fromJS } from 'immutable' import { reducer as MetaReducer } from 'mk-meta-engine' import config from './config' import moment from 'moment' import { getInitState } from './data' class reducer { constructor(option) { this.metaReducer = option.metaReducer } init = (state, option)...
'use strict'; /** * Adds a on message handler to the socket. * * @param {object} standardSocket The standard socket. * @param {object} wrappedSocket The wrapped socket. * @param {object} requestCache The request cache to use. * @param {object} options Websocket options. * @param {function} handler The message h...
(function() { 'use strict'; angular.module('formApp', [ /* * Order is not important. Angular makes a * pass to register all of the modules listed * and then when app.dashboard tries to use app.data, * it's components are available. */ /* * ...
(function() { 'use strict'; angular.module('toptens') .directive('ngMax', ngMax); function ngMax() { return { restrict: 'A', require: 'ngModel', link: function(scope, elem, attr, ctrl) { scope.$watch(attr.ngMax, function(){ if (ctrl.$isDirty)...
// All symbols with the `Join_Control` property as per Unicode v7.0.0: [ '\u200C', '\u200D' ];
(function(csc) { module("cornerstoneCore.storedPixelDataToCanvasImageData"); test("storedPixelDataToCanvasImageData", function() { // Arrange var lut = [0,128,255]; var canvasImageDataData = []; var image = { storedPixelData: [0,1,2], rows: 1, ...
'use strict'; var isA = require("Espresso/oop").isA; var oop = require("Espresso/oop").oop; var init = require("Espresso/oop").init; var trim = require("Espresso/trim").trim; var isA = require("Espresso/oop").isA; var oop = require("Espresso/oop").oop; module.exports = { PRE_CONFIGURE: 'pre_configure', PRE_STAR...
module.exports = { "key": "uxie", "moves": [ { "learn_type": "tutor", "name": "foul-play" }, { "learn_type": "tutor", "name": "magic-room" }, { "learn_type": "tutor", "name": "wonder-room" }, ...
var Q = require('q'); var Lastfm = function (options) { this.user = options.user; this.api_key = options.key; this.callbacks_store_name = options.callbacks_store_name;//Required for browser }; Lastfm.prototype.getLovedTracks = function(){ var deferred = Q.defer(); that = this; var limit = 50; var page_...
'use strict' /* @flow */ import React from 'react' import ReactCSS from 'reactcss' import Checkboard from './Checkboard' export class Alpha extends ReactCSS.Component { constructor() { super() this.handleChange = this.handleChange.bind(this) this.handleMouseDown = this.handleMouseDown.bind(this) ...
var assert = require('assert'); var genericCommand = require('genericCommand'); require('test/fixtures/admin/fixture_environments'); var adminenvironments = { create : genericCommand(require('cmd/fh3/admin/environments/create')), read : genericCommand(require('cmd/fh3/admin/environments/read')), update : genericC...
'use babel'; // https://github.com/danielbrodin/atom-project-manager/blob/master/lib/projects-list-view.js import {TextEditor} from 'atom'; import {SelectListView, $} from 'atom-space-pen-views'; import Behat from './behat' /** * @class SelectListView */ export default class BehatToolsView ex...
config({ 'gallery/formValidation/index': {requires: ['node','base']} });
import React from 'react' import { Icon } from 'antd' import cls from 'classnames' import AreaChart from './AreaChart' import BarChart from './BarChart' import LinearChart from './LinearChart' import PunchChart from './PunchChart' import './Chart.scss' export default function ({ data, width = 1000, height = 160, typ...
/* jshint -W071, -W074 */ /* global jQuery:false */ /* Disabled options are: * W071: This function has too many statements * W074: This function's cyclomatic complexity is too high */ /* * jQuery ezPlus 1.1.11 * Demo's and documentation: * http://igorlino.github.io/elevatezoom-plus/ * * licensed under MIT lic...
'use strict' eventsApp.controller('EventController', function EventsController($scope){ $scope.event = { name: "Aaron's Great Event", date: "1/31/2014", time: "1:00 am", location: { address: "11 Bell Ave.", city: "Ottawa", province: "Ontario" }, imageUrl: "http://devpnt.com...
"use strict"; /*jslint bitwise: true */ /** * @module opcua.address_space */ require("requirish")._(module); var util = require("util"); var EventEmitter = require("events").EventEmitter; var NodeId = require("lib/datamodel/nodeid").NodeId; var makeNodeId = require("lib/datamodel/nodeid").makeNodeId; var resolveNo...
/* global module:false */ module.exports = function(grunt) { var port = grunt.option('port') || 8000; // Project configuration grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), meta: { banner: '/*!\n' + ' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' +...
import * as UTILS from './globals'; WHS.Component.prototype.changeColor = function (world) { const object = this, color = new THREE.Color(); const animation = new WHS.Loop(() => { object.material.color = color; if (color.r <= 1) color.r += 0.01; if (color.g >= 0) color.g -= 0.01; ...
define("Config", [], function () { var config = { baseUrl: "/Blog/widget/" }; return config; });
import { readFile } from 'fs'; import { join } from 'path'; import { defaults } from 'lodash'; import promisify from 'es6-promisify'; import nodemailer from 'nodemailer'; import sendGridTransport from 'nodemailer-sendgrid-transport'; import Handlebars from 'handlebars'; import config from '../config'; import Internatio...
var __wpo = { "assets": { "main": [ "./main.js" ], "additional": [], "optional": [] }, "externals": [], "hashesMap": { "46664e32e08e2b389eff0e531eb8b49f279d2624": "./main.js" }, "strategy": "changed", "responseStrategy": "cache-first", "version": "6ebdaa18aaeecc92adec7016bbd4b9...
'use strict'; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var dbCommon = require('../common'); var Release...
module.exports = {"2510":{"id":"2510","parentId":"303","name":"\u57ce\u533a"},"2511":{"id":"2511","parentId":"303","name":"\u9ad8\u5e73\u5e02"},"2512":{"id":"2512","parentId":"303","name":"\u6c81\u6c34\u53bf"},"2513":{"id":"2513","parentId":"303","name":"\u9633\u57ce\u53bf"},"2514":{"id":"2514","parentId":"303","name":...
class bootState { create() { // Starting the physics system - in this case we are using the // simple (but effective) ARCADE physics engine game.physics.startSystem(Phaser.Physics.Arcade); if(this.game.device.android) { scaleRatio = window.devicePixelRatio / 5; }else if(this.game.device.desktop) { ...
/*global it:true, beforeEach:true, describe:true*/ var expect = require('chai').expect; var Cuara = require('../lib').Parser; var CuaraModel = require('../lib').Model; describe('Parser Spec', function(){ describe('#new', function(){ var template; beforeEach(function() { template = new Cuara({ model: Cu...
// @flow import { newConstantsNamespace } from './utils'; const TokenType = newConstantsNamespace({ format: 'TokenType{ %s }', source: [ 'CONTEXT', 'QUERY_STATEMENT', 'QUERY_STATEMENT_END', 'CSS_SELECTOR', 'ACCESSOR_SEQUENCE', 'INDEX_ACCESSOR', 'TEXT_AC...
iD.ui.MapData = function(context) { var key = 'F', features = context.features().keys(), fills = ['wireframe', 'partial', 'full'], fillDefault = context.storage('area-fill') || 'partial', fillSelected = fillDefault; function map_data(selection) { function showsFeature(d...
'use strict'; var fs = require('fs'), path = require('path'); /** * Gets JSON data. * * @param file {String} Location of JSON file. * * @return data {Object} Javascript object data. */ module.exports = function (file, copy) { var fullpath = path.join(process.cwd(), file), dir = path.dirname(fu...
"use strict"; const EventEmitter3 = require("eventemitter3"); class TsBase extends EventEmitter3 { constructor() { super(); let _isDataRequired = false; let _processing = 0; let _callback = null; let _upstreamCallback = null; let _pipes = []; let _writePi...
/** * base.js for model */ var Db = require('mongodb').Db; var Connection = require('mongodb').Connection; var Server = require('mongodb').Server;
// This is how numerals are encoded. They take a function and a value then apply that function to the value or the previous result of application n times where n is the number being encoded. // ## General // zero is the KI combinator just like False - not very type safe! export const zero = _ => x => x // and one is ...
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.8/esri/copyright.txt for details. //>>built define({toggle:"\u0e1b\u0e38\u0e48\u0e21\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e40\u0e1b\u0e34\u0e14\u0e1b\u0e34\u0e14\u0e41\u0e1c\u0e19\u0e17\u0e35\u0e48\u0e10\u0e...
var fs = require('fs'); var argv = require('optimist').argv; if (argv._.length !== 2) { usage(); } var command = argv._[0]; var port = argv._[1]; if (!port.toString().match(/^\d+$/)) { usage(); } var daemon = require("daemonize2").setup({ main: "serve.js", name: "standby-" + port, pidfile: "/tmp/st...
import { forEach } from 'min-dash'; var LOW_PRIORITY = 250; /** * The tool manager acts as middle-man between the available tool's and the Palette, * it takes care of making sure that the correct active state is set. * * @param {Object} eventBus * @param {Object} dragging */ export default function To...
'use strict'; var assert = require('assert'), stockMarket = require('../stockMarket'); describe('bestDealInStockMarket()', function() { it('should find the best day to buy and sell in the stock market', function() { // arrange var market = [100, 98, 97, 89, 110, 190, 90, 240, 230, 200, 190]; /...
// Copyright (c) 2011+, HL7, Inc & The MITRE Corporation // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, this...
'use strict'; exports.defer = function() { var resolve, reject; var promise = new Promise(function() { resolve = arguments[0]; reject = arguments[1]; }); return { resolve: resolve, reject: reject, promise: promise }; }; exports.timeout = function(promise, time) { var done; var delayP...
// The MIT License (MIT) // Typed.js | Copyright (c) 2014 Matt Boldt | www.mattboldt.com // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation...
import PatientInput from './PatientInput'; export default PatientInput;
import './list-page.less'; import ListPage from './list-page'; export default ListPage;
import React, { Component, PropTypes } from 'react'; import { Link } from 'react-router'; import { connect } from 'react-redux'; import Helmet from 'react-helmet'; import { initialize } from 'redux-form'; import { RegisterForm } from 'components'; import * as authActions from 'redux/modules/auth'; import toastr from 't...
describe('OnionSkin', function () { it('should be available on window', function () { expect(OnionSkin).not.to.be.undefined; }); it('should return an instance of pool', function () { expect(new OnionSkin()).to.be.an.instanceof(OnionSkin.Pool); }); });
angular.module('app').controller('Settings', function($scope, $routeParams, $api) { $scope.form_data = { email: $scope.current_person.email, first_name: $scope.current_person.first_name, last_name: $scope.current_person.last_name, display_name: $scope.current_person.display_name, bio: $scope.curre...
/* var map = new google.maps.Map(document.getElementById("map"), { zoom: 7, center: new google.maps.LatLng(36,138), mapTypeId: google.maps.MapTypeId.ROADMAP }); */ /* function getLatLng(place) { alert(place); var geocoder = new google.maps.Geocoder(); geocoder.geocode({ address: place, region: ...
exports = module.exports = function () { // mock of profile service (should be sinon stub?) var profileMock = function profile (err, user) { return { update: function (req, callback) { callback(err, user); } }; }; // mock of article service (shoul...
import Component from '@ember/component'; import { UnsupportedMediaTypeError, isRequestEntityTooLargeError, isUnsupportedMediaTypeError, isVersionMismatchError } from 'ghost-admin/services/ajax'; import {computed} from '@ember/object'; import {htmlSafe} from '@ember/string'; import {isBlank} from '@embe...
var directive = require('./directive'); module.exports = angular.module('app.components.quiz.image_upload', []) .directive("appStudentUpload", directive)
'use strict' /** * adonis-commands * * (c) Harminder Virk <virk@adonisjs.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ const BaseGenerator = require('./Base') const path = require('path') class KeyGenerator extends BaseGen...
/*! jQuery UI - v1.9.2 - 2015-05-31 * http://jqueryui.com * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ jQuery(function(e){e.datepicker.regional.ru={closeText:"Закрыть",prevText:"&#x3C;Пред",nextText:"След&#x3E;",currentText:"Сегодня",monthNames:["Январь","Февраль","Март","Апрель","Май","И...
const base = require( './base.js' ); module.exports = Object.assign( {}, base, { list: [ '/r/globaloffensive janitor', '/r/globaloffensive moderator', '/r/globaloffensive monsorator', '#r/globaloffensive admin', '3dmax fan', '400k hype', '5 year subreddit vet...
function injectGitFileStatus() { const timeout = 5000; const addedColor = "#32CD32"; const modifiedColor = "#FF8C00"; const ignoredOpacity = "0.4"; const explorer = document.getElementById("workbench.view.explorer"); if (explorer) { const foldersView = explorer.getElementsByClassNam...
'use strict'; describe('ngSocial.version module', function() { beforeEach(module('ngSocial.version')); describe('app-version directive', function() { it('should print current version', function() { module(function($provide) { $provide.value('version', 'TEST_VER'); }); inject(function...
version https://git-lfs.github.com/spec/v1 oid sha256:54d1a6830f702dd9d1c4633f2050958a010c41d695bbd8a14029dfe32737f682 size 6065
'use strict'; module.exports = { type: 'success', result: { start: { line: 1, column: 1, }, end: { line: 1, column: 2, }, tokens: [ { type: 'number', start: { line: 1, column: 1, }, end: { line: 1, ...
'use strict'; // # Globbing // for performance reasons we're only matching one level down: // 'test/spec/{,*/}*.js' // use this if you want to recursively match all subfolders: // 'test/spec/**/*.js' module.exports = function (grunt) { // Load grunt tasks automatically. require('load-grunt-tasks')(grunt); ...
'use strict'; require('mocha'); const assert = require('assert'); const colors = require('ansi-colors'); const Prompt = require('../lib/prompts/input'); const { kepresses } = require('./support')(assert); let prompt; describe('Input Prompt', function() { describe('options.initial', () => { it('should use value ...
ZRF = { JUMP: 0, IF: 1, FORK: 2, FUNCTION: 3, IN_ZONE: 4, FLAG: 5, SET_FLAG: 6, POS_FLAG: 7, SET_POS_FLAG: 8, ATTR: 9, SET_ATTR: 10, PROMOTE: 11, MODE: 12, ON_BO...
/* !{id:msgpack.codec.js,ver:1.05,license:"MIT",author:"uupaa.js@gmail.com"} */ this.msgpack||function(g){function a(a){this._n=a}function c(a){m="string"===typeof a?j(a):a;f=-1;return b()}function e(b,d,c){var i,h,f;if(null==d)b.push(192);else if(!1===d)b.push(194);else if(!0===d)b.push(195);else switch(typeof d){cas...
/** * Function that returns default values. * Used because Object.assign does a shallow instead of a deep copy. * Using [].push will add to the base array, so a require will alter * the base array output. */ 'use strict'; const path = require('path'); const srcPath = path.join(__dirname, '/../src'); const dfltPor...
var BalancedAchCrowdfund = require('./lib/balanced-ach-crowdfund'); module.exports = BalancedAchCrowdfund;
'use strict'; function ExFormat (type,data) { var self = this; self.init(type,data); } var functionExFormat = { cathaybk:cathayFormat, fubonbk:fubonFormat, megabk:normalFormat, twbk:normalFormat, chbbk:chbFormat, esunbk:normalFormat, hncbbk:hncbFormat, feibbk:normalFormat, ...
// ========================================================================== // SC.Logger Unit Test // ========================================================================== /*globals module test equals */ // Test console needed because testing for null functions, // ie. setting the actual console.log = null me...
const mongoose = require('mongoose'); const uniqueValidator = require('mongoose-unique-validator'); const Schema = mongoose.Schema; const episodeSchema = new Schema({ title: { type: String, required: true }, description: { type: String, required: true }, media: { type: String, required: true }, date: { type:...
/*! * inwx 1.0.0 * https://github.com/mattes/inwx-nodejs * * Copyright 2012 Matthias Kadenbach * Released under the MIT license * * * INWX XML-RPC API DOC: * https://www.inwx.de/de/help#key=20 * https://www.inwx.de/de/download/file/api-current.zip (logged in inwx customers only) */ var xmlrpc = require('xml...
function jh__code__error (jh) { return function jh__code__error (code, err, type) { err = (type || Error)(err); err.$loc = code.$ err.$pos = code.$$; return err; }; }
/** * MarkdownService * * @description :: For handling uploads */ var marked = require('marked'); marked.setOptions({ renderer: new marked.Renderer(), gfm: true, tables: true, breaks: false, pedantic: false, sanitize: true, smartLists: true, smartypants: false }); module.exports =...
const path = require('path'); const webpackMerge = require('webpack-merge'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const commonConfig = require('./webpack.common'); module.exports = webpackMerge(commonConfig, { devtool: 'source-map', output: { path: path.resolve('dist'), pu...
module.exports = { build_dir: 'build', compile_dir: 'bin', app_files: { // source, but NO specs js: [ 'src/**/*.js', '!src/**/*.spec.js' ], jsunit: [ 'src/**/*.spec.js' ], // our partial templates atpl: [ 'src/app/**/*.tpl.html' ], ctpl: [ 'src/common/**/*.t...
require('./spec_helper'); describe('Cursor', function() { var Cursor, subject, data, cells, callbackSpy; beforeEach(function() { Cursor = require('../src/cursor'); cells = [{cell_id: 4}, {cell_id: 32}, {cell_id: 44}]; data = {scaling: 'containers', cells, desiredLrps: []}; callbackSpy = jasmine.crea...
const extra = req => ( { params: { ...req.query, ...req.params } } ); export function sendNotFound(req, res) { sendFail(req, res, 404, 'Not Found'); } export function sendFail(req, res, status, error) { res.status(status).send({ ...extra(req), success: false, error: error.message ? error.message : e...
/* Node.js - Allows you to build scalable network applications using JavaScript on the server-side. - Runs on top of the V8 JavaScript Runtime (same that is running on the Chrome browser) What can you build? - Web socket Server - File Upload client - Ad Server - Real-time data apps Misconceptions - Node....
// Neon Gruntfile // -------------- module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), concat: { dist: { src: [ 'bower_components/jquery/dist/jquery.js', ...