commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
e2eca91cfe4a7a13fa825b40815d0749cc11f989
src/foam/nanos/menu/SubMenu.js
src/foam/nanos/menu/SubMenu.js
/** * @license * Copyright 2017 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ package: 'foam.nanos.menu', name: 'SubMenu', extends: 'foam.nanos.menu.AbstractMenu', requires: [ 'foam.nanos.menu.SubMenuView' ], methods: [ // Code below is for conv...
/** * @license * Copyright 2017 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ package: 'foam.nanos.menu', name: 'SubMenu', extends: 'foam.nanos.menu.AbstractMenu', requires: [ 'foam.nanos.menu.SubMenuView' ], methods: [ function launch() { /** N...
Fix for my last menu fix.
Fix for my last menu fix.
JavaScript
apache-2.0
jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2
9e734eca0da3e455a11460b9e27b78254fa43809
core/build/webpack.client.config.js
core/build/webpack.client.config.js
const webpack = require('webpack') const merge = require('webpack-merge') const base = require('./webpack.base.config') const path = require('path') const VueSSRClientPlugin = require('vue-server-renderer/client-plugin') const config = merge(base, { output: { path: path.resolve(__dirname, '../../dist'), publ...
const webpack = require('webpack') const merge = require('webpack-merge') const base = require('./webpack.base.config') const path = require('path') const VueSSRClientPlugin = require('vue-server-renderer/client-plugin') const config = merge(base, { optimization: { splitChunks: { cacheGroups: { co...
Revert "Minor - webpack client filename change"
Revert "Minor - webpack client filename change" This reverts commit 8a687defb70b7c4bab6c5aac3be8867d8efd7542.
JavaScript
mit
DivanteLtd/vue-storefront,pkarw/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront
f389dd376c8fc90e92eb643583afbc0a49dc8930
src/render-queue.js
src/render-queue.js
import options from './options'; import { defer } from './util'; import { renderComponent } from './vdom/component'; /** Managed queue of dirty components to be re-rendered */ // items/itemsOffline swap on each rerender() call (just a simple pool technique) let items = [], itemsOffline = []; export function enqueue...
import options from './options'; import { defer } from './util'; import { renderComponent } from './vdom/component'; /** Managed queue of dirty components to be re-rendered */ // items/itemsOffline swap on each rerender() call (just a simple pool technique) let items = [], itemsOffline = []; export function enqueue...
Remove unnecessary early exit for a condition that rarely/never occurs.
Remove unnecessary early exit for a condition that rarely/never occurs.
JavaScript
mit
neeharv/preact,developit/preact,gogoyqj/preact,neeharv/preact,developit/preact
34bf08d08b111fd67b2a346f8bcae1658fe68a51
src/routes/index.js
src/routes/index.js
/* eslint-disable no-unused-vars*/ import React from 'react'; /* eslint-enable no-unused-vars*/ import { Router, Route, IndexRoute } from 'react-router'; import createBrowserHistory from 'history/lib/createBrowserHistory'; import App from 'containers/App/'; import Home from 'containers/Home/'; const Routes = () => ( ...
/* eslint-disable no-unused-vars*/ import React from 'react'; /* eslint-enable no-unused-vars*/ import { Router, Route, IndexRoute } from 'react-router'; import createBrowserHistory from 'history/lib/createBrowserHistory'; import App from './App/'; import Home from './Home/'; const Routes = () => ( <Router history=...
Change import path of routes
Change import path of routes
JavaScript
mit
pl12133/pl12133.github.io,pl12133/pl12133.github.io
8d40f4d706fa898002ea3b8cc33b38ab377befcb
addon/classes/row.js
addon/classes/row.js
import ObjectProxy from '@ember/object/proxy'; import { merge } from '@ember/polyfills'; /** * @class Row * @extends Ember.ObjectProxy * @namespace SemanticUI */ const Row = ObjectProxy.extend({ /** * Whether the row is currently selected. * * @property selected * @type Boolean * @default false ...
import ObjectProxy from '@ember/object/proxy'; import { assign } from '@ember/polyfills'; /** * @class Row * @extends Ember.ObjectProxy * @namespace SemanticUI */ const Row = ObjectProxy.extend({ /** * Whether the row is currently selected. * * @property selected * @type Boolean * @default false ...
Replace usage of merge with assign
Replace usage of merge with assign
JavaScript
mit
quantosobra/ember-semantic-ui-table,quantosobra/ember-semantic-ui-table
43646a6e0b8503ed8a6422037d25614a738b94e6
addon/errors/load.js
addon/errors/load.js
/** * A simple Error type to represent an error that occured while loading a * resource. * * @class LoadError * @extends Error */ export default class LoadError extends Error { /** * Constructs a new LoadError with a supplied error message and an instance * of the AssetLoader service to use when retrying ...
function ExtendBuiltin(klass) { function ExtendableBuiltin() { klass.apply(this, arguments); } ExtendableBuiltin.prototype = Object.create(klass.prototype); ExtendableBuiltin.prototype.constructor = ExtendableBuiltin; return ExtendableBuiltin; } /** * A simple Error type to represent an error that occu...
Make it possible to extend from `Error` in Babel 6.
Make it possible to extend from `Error` in Babel 6.
JavaScript
mit
ember-engines/ember-asset-loader,trentmwillis/ember-asset-loader,trentmwillis/ember-asset-loader,trentmwillis/ember-asset-loader,ember-engines/ember-asset-loader,ember-engines/ember-asset-loader
6d78bdca94ff5e35edf2e09e228ad534c57008c6
public/dist/js/voter-login.js
public/dist/js/voter-login.js
$(document).ready(function() { $('#voterloginbox').submit(function(event) { var formData = { 'voter_token' : $('input[name=voter_token]').val(), '_csrf' : $('input[name=_csrf]').val(), 'g-recaptcha-response' : $('textarea[name=g-recaptcha-response]...
$(document).ready(function() { $("#voter_token").keyup(function(event){ if(event.keyCode == 13){ $("#next_btn").click(); } }); $('#voterloginbox').submit(function(event) { var formData = { 'voter_token' : $('input[name=voter_token]').val(), ...
Test out having enter press bring up modal
Test out having enter press bring up modal
JavaScript
agpl-3.0
WireShoutLLC/votehaus,WireShoutLLC/votehaus,WireShoutLLC/votehaus,WireShoutLLC/votehaus
63fc607d48bf8e5439e6addc1cf3fc45adb444d4
fp.js
fp.js
module.exports = { "extends": [ "./index.js", ], plugins: ["fp"], rules: { "fp/no-arguments": "error", "fp/no-class": "warn", "fp/no-delete": "error", "fp/no-events": "error", "fp/no-get-set": "error", "fp/no-let": "error", "fp/no-loops": "error", "fp/no-mutating-assign": "...
module.exports = { "extends": [ "./index.js", ], plugins: ["fp"], rules: { "fp/no-arguments": "error", "fp/no-class": "warn", "fp/no-delete": "error", "fp/no-events": "error", "fp/no-get-set": "error", "fp/no-let": "error", "fp/no-loops": "error", "fp/no-mutating-assign": "...
Add a warning for sorting keys
Add a warning for sorting keys
JavaScript
mit
momentumft/eslint-config-momentumft
540ec2d5e090e0e9740e00c90d4b4fd9ff09ca55
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ...
Add jquery ui to app.js
Add jquery ui to app.js
JavaScript
mit
dma315/ambrosia,dma315/ambrosia,dma315/ambrosia
82322ac222c9a0c6b3534270d38f063a3c67cf50
addon/change-gate.js
addon/change-gate.js
import Em from 'ember'; let get = Em.get; let defaultFilter = function(value) { return value; }; export default function(dependentKey, filter) { filter = filter || defaultFilter; let computed = Em.computed(function handler(key) { let lastValueKey = `__changeGate${key}LastValue`; let isFirstRun = !this.h...
import Em from 'ember'; let get = Em.get; let defaultFilter = function(value) { return value; }; export default function(dependentKey, filter) { filter = filter || defaultFilter; let computed = Em.computed(function handler(key) { let lastValueKey = `__changeGate${key}LastValue`; let isFirstRun = !this.h...
Use Ember.isEqual instead of direct equality
Use Ember.isEqual instead of direct equality
JavaScript
mit
GavinJoyce/ember-computed-change-gate,givanse/ember-computed-change-gate,GavinJoyce/ember-computed-change-gate,givanse/ember-computed-change-gate
fd1c12db210589a285b5917353e40714ca23e4b2
app/models/league.js
app/models/league.js
import CoreObject from 'fantasy-weather/models/_core/core-object'; import Team from 'fantasy-weather/models/team'; let League = CoreObject.extend({ // Set defaults and stub out properties _defaults() { return { name: "", teams: [] }; }, addTeam(team) { let teams = this.get('teams'); ...
import CoreObject from 'fantasy-weather/models/_core/core-object'; import Team from 'fantasy-weather/models/team'; let League = CoreObject.extend({ // Set defaults and stub out properties _defaults() { return { name: "", teams: [] }; }, addTeam(team) { let teams = this.get('teams'); ...
Add methods to find team/stadium by abbreviation
Add methods to find team/stadium by abbreviation
JavaScript
mit
rjhilgefort/nfl-weather,rjhilgefort/nfl-weather,rjhilgefort/nfl-weather
ad65d3a5d5419132635f188e90b3aa4e25626064
scripts/assertion-messages.js
scripts/assertion-messages.js
#!/usr/bin/env node var recast = require('recast'); var messages = require('./transform/messages'); var exec = require('child_process').exec; var fs = require('fs'); var glob = require('glob'); var usage = [ 'Usage: assertion-messages.js "globbing expression"', 'To generate assertion messages for a set of test files,...
#!/usr/bin/env node var recast = require('recast'); var messages = require('./transform/messages'); var exec = require('child_process').exec; var fs = require('fs'); var glob = require('glob'); var usage = [ 'Usage: assertion-messages.js "globbing expression"', 'To generate assertion messages for a set of test files,...
Allow script to be invoke from any directory
Allow script to be invoke from any directory
JavaScript
mit
bocoup/test262-v8-machinery,bocoup/test262-v8-machinery
d6e3cdc458867d1aa90197b1b8b9a10ce65b9118
src/MentionMenu.js
src/MentionMenu.js
import React from "react"; import portal from "react-portal-hoc"; const MentionMenu = props => { const { active, className, item: Item, options, top, left, hoverItem, selectItem, style = {} } = props; const menuStyle = { ...style, left, top, position: "absolute...
import React from "react"; import portal from "react-portal-hoc"; class MentionMenu extends React.Component { constructor(props) { super(props); this.state = { left: props.left, top: props.top }; } componentWillReceiveProps(nextProps) { if (nextProps.left != this.state.left || nextPro...
Improve menu positioning to keep it from going off screen
Improve menu positioning to keep it from going off screen tries to keep the menu from going off the bottom or right of screen
JavaScript
mit
mattkrick/react-githubish-mentions
23557892e740c28ea38304874636b3295e99a68c
test/scripts/cli.js
test/scripts/cli.js
'use strict'; var opbeat = require('../../'); var inquirer = require('inquirer'); var questions = [ { name: 'app_id', message: 'App ID' }, { name: 'organization_id', message: 'Organization ID' }, { name: 'secret_token', message: 'Secret token' } ]; var test = function (options) { options.env = 'production'; ...
'use strict'; var opbeat = require('../../'); var inquirer = require('inquirer'); var questions = [ { name: 'app_id', message: 'App ID' }, { name: 'organization_id', message: 'Organization ID' }, { name: 'secret_token', message: 'Secret token' } ]; var test = function (options) { options.env = 'production'; ...
Improve error names when running integration test
Improve error names when running integration test
JavaScript
bsd-2-clause
opbeat/opbeat-node,driftyco/opbeat-node,opbeat/opbeat-node
e9e8eb0a238a641c190f200b684fb3549b5a276d
src/objects/mob.js
src/objects/mob.js
// namespace var App = App || {}; App.Mob = (function () { "use strict"; var fn = function (game, username, x, y) { Phaser.Sprite.call(this, game, x, y, 'alienBlue'); this.game.physics.arcade.enable(this); this.frame = 0; this.scale.setTo(.7, .7); this.animations.add('r...
// namespace var App = App || {}; App.Mob = (function () { "use strict"; var fn = function (game, username, x, y) { Phaser.Sprite.call(this, game, x, y, 'alienBlue'); this.game.physics.arcade.enable(this); this.frame = 0; this.scale.setTo(.7, .7); this.animations.add('r...
Add arcade.collide logic to App.Mob objects.
Add arcade.collide logic to App.Mob objects.
JavaScript
mit
hookbot/multi-player,hookbot/multi-player
f9331ee186f212290d771fb10e45e1628b89b49f
species-explorer/app/services/species.service.js
species-explorer/app/services/species.service.js
/* global angular */ angular .module('speciesApp') .factory('SpeciesService', [ 'API_BASE_URL', '$resource', SpeciesService ]) function SpeciesService (API_BASE_URL, $resource) { return $resource( API_BASE_URL, null, { getKingdoms: { method: 'GET', isArray: false,...
/* global angular */ angular .module('speciesApp') .factory('SpeciesService', [ 'API_BASE_URL', '$resource', SpeciesService ]) function SpeciesService (API_BASE_URL, $resource) { return $resource( API_BASE_URL, null, { getKingdoms: { method: 'GET', isArray: false,...
Add an action to get species by family
Add an action to get species by family
JavaScript
mit
stivaliserna/scripts,stivaliserna/scripts
086b7eafeefb761f3883b9eeccb231152dfdbda0
src/filters/filter-builder.js
src/filters/filter-builder.js
import { cloneDeep } from 'lodash' import filters from './index' import { boolMerge } from '../utils' export default class FilterBuilder { constructor () { this._filters = {} } /** * Apply a filter of a given type providing all the necessary arguments, * passing these arguments directly to the specifie...
import { cloneDeep } from 'lodash' import filters from './index' import { boolMerge } from '../utils' export default class FilterBuilder { constructor () { this._filters = {} } /** * Apply a filter of a given type providing all the necessary arguments, * passing these arguments directly to the specifie...
Annotate jsdoc for FilterBuilder class as private
Annotate jsdoc for FilterBuilder class as private
JavaScript
mit
node-packages/bodybuilder,node-packages/bodybuilder,ShareIQ/bodybuilder,ShareIQ/bodybuilder,danpaz/bodybuilder,danpaz/bodybuilder,danpaz/bodybuilder
cb20cbe08c0e52613124e18ec8991a216949a11b
Resources/public/js/emails.js
Resources/public/js/emails.js
jQuery(document).ready(function () { jQuery('#add-another-email').click(function () { var emailList = jQuery('#email-fields-list'); var newWidget = emailList.attr('data-prototype'); newWidget = newWidget.replace(/__name__/g, emailCount); emailCount++; var newDiv = jQuery('<di...
$(document).ready(function () { $('#add-another-email').click(function () { var emailList = $('#email-fields-list'); var newWidget = emailList.attr('data-prototype'); newWidget = newWidget.replace(/__name__/g, emailCount); emailCount++; var newDiv = $('<div></div>').html(newW...
Add design to email collection
BAP-251: Add design to email collection
JavaScript
mit
geoffroycochard/platform,orocrm/platform,umpirsky/platform,trustify/oroplatform,hugeval/platform,mszajner/platform,akeneo/platform,Djamy/platform,northdakota/platform,2ndkauboy/platform,morontt/platform,ramunasd/platform,trustify/oroplatform,umpirsky/platform,hugeval/platform,akeneo/platform,hugeval/platform,northdakot...
2c62380798476a22bbb50dd7780fbf4f24e02b5c
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), sass: { options: { includePaths: ['app/bower_components/foundation/scss'] }, dist: { options: { outputStyle: 'default' }, files: { 'app/app.css...
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), sass: { options: { includePaths: ['app/bower_components/foundation/scss'] }, dist: { options: { outputStyle: 'default' }, files: { 'app/app.css...
Exclude testing files from deploy
Exclude testing files from deploy
JavaScript
mit
regdoug/solartime
ac7fa80dbd84e31a06dc99a65e268de7c69e0924
Gruntfile.js
Gruntfile.js
module.exports = function( grunt ) { "use strict"; grunt.initConfig({ bump: { options: { files: [ "package.json" ], // Commit commit: true, commitMessage: "Release v%VERSION%", commitFiles: [ "package.json" ], ...
module.exports = function( grunt ) { "use strict"; grunt.initConfig({ bump: { options: { files: [ "package.json" ], // Commit commit: true, commitMessage: "Release v%VERSION%", commitFiles: [ "package.json" ], ...
Simplify definition of jscs task
Simplify definition of jscs task
JavaScript
mit
markelog/grunt-checker,jscs-dev/grunt-jscs,BridgeAR/grunt-jscs
1dfe8b60b598e9f1ed87f1087c1a43a49d57dbe0
postcss.config.js
postcss.config.js
/* eslint global-require:0 */ module.exports = { map: { inline: true }, plugins: [ require('postcss-custom-properties')({ importFrom: 'src/css/00_variables.css' }), ] };
/* eslint global-require:0 */ module.exports = { map: { inline: true }, plugins: [ require('postcss-custom-properties')({ preserve: false, importFrom: 'src/css/00_variables.css' }), ] };
Add preserve: false to dev as well
Add preserve: false to dev as well
JavaScript
mit
frippz/frippz.se,frippz/frippz.se,frippz/frippz.se
470860f96e1b2b2c866d41690ae9769ad30f89a7
Themeleon.js
Themeleon.js
'use strict'; var path = require('path'); /** * Themeleon helper constructor. * * See the functions from `factory.js` for variables signification. * * This constructor has an empty prototype (except the `use` method) since * Themeleon works only with mixins. There's a main mixin in `main.js` * containing the b...
'use strict'; var fs = require('fs'); var path = require('path'); var q = require('q'); var mkdir = q.denodeify(fs.mkdir); /** * Themeleon helper constructor. * * See the functions from `factory.js` for variables signification. * * This constructor has an empty prototype (except the `use` method) since * Theme...
Create destination directory if not exists
Create destination directory if not exists
JavaScript
unlicense
themeleon/themeleon,themeleon/themeleon
bac5bacb594b772b07f42ce321626337c19dde0b
TrackAnnot/app/view/Viewport.js
TrackAnnot/app/view/Viewport.js
Ext.define('TrackAnnot.view.Viewport', { renderTo: Ext.getBody(), extend: 'Ext.container.Viewport', items: [{ xtype: 'toolbar', items: [{ text: 'Metrics', menu: { xtype: 'menu', items: [{ text: 'Video', checked: false }, { ...
Ext.define('TrackAnnot.view.Viewport', { renderTo: Ext.getBody(), extend: 'Ext.container.Viewport', items: [{ xtype: 'toolbar', items: ['<b>A</b>nnotation <b>M</b>ovement <b>A</b>ccelerometer', { text: 'Metrics', menu: { xtype: 'menu', items: [{ ...
Add placeholders for new metrics.
Add placeholders for new metrics.
JavaScript
apache-2.0
NLeSC/eEcology-Annotation-UI,NLeSC/eEcology-Annotation-UI,NLeSC/eEcology-Annotation-UI
3501a2a8868b0e2c9594555de00d2ed6279696d1
app/data/bookshelf/migrate.js
app/data/bookshelf/migrate.js
import Knex from 'knex'; import config from '../../config/config.json'; const knex = Knex.initialize(config.bookshelf.postgresql); export default function () { knex.migrate.latest(config.bookshelf.migrations) .then(function () { knex.destroy(); }); }
import Knex from 'knex'; import config from '../../config/config.json'; const knex = Knex(config.bookshelf.postgresql); export default function () { knex.migrate.latest(config.bookshelf.migrations) .then(function () { knex.destroy(); }); }
Stop using the deprecated knex.initialize
Stop using the deprecated knex.initialize
JavaScript
mit
wellsam/nerd,Xantier/nerd-stack,Xantier/nerd-stack,wellsam/nerd,isp1r0/nerd-stack,isp1r0/nerd-stack
1a93325776c6ae619d85239a0336cb06d40682fb
conkeror/bindings.js
conkeror/bindings.js
define_key(text_keymap, "C-w", "cmd_deleteWordBackward"); define_key(content_buffer_normal_keymap, "c", "copy", $browser_object = browser_object_dom_node);
function history_clear () { var history = Cc["@mozilla.org/browser/nav-history-service;1"] .getService(Ci.nsIBrowserHistory); history.removeAllPages(); } interactive("history-clear", "Clear the history.", history_clear); define_key(text_keymap, "C-w", "cmd_deleteWordBackward"); define_key(content_buffer_norm...
Add a history-clear function to conkeror
Add a history-clear function to conkeror
JavaScript
bsd-3-clause
pjones/emacsrc
04cf346847f0472555407997f5167cf233ba6e0e
cli.js
cli.js
#!/usr/bin/env node 'use strict'; var assertSchema = require('./index'); var yargs = require('yargs'); var opts = yargs .demand(1) .usage( 'Usage: $0 [ -d database url ] <schema>\n' + 'Asserts the existence of schema, creating it if necessary' ) .option('d', { alias: 'database_url', type: 'st...
#!/usr/bin/env node 'use strict'; var assertSchema = require('./index'); var yargs = require('yargs'); var opts = yargs .demand(1) .usage( 'Usage: $0 [ -d database url ] <schema>\n' + 'Asserts the existence of schema, creating it if necessary' ) .option('d', { alias: 'database_url', type: 'st...
Allow DATABASE_URL to override passed option
Allow DATABASE_URL to override passed option
JavaScript
mit
apechimp/node-pg-assert-schema
520e87c145d4b659affd67936ea9cd86d4e100ee
app/index.js
app/index.js
var util = require('util'), yeoman = require('yeoman-generator'); // mocha:app generator // // Setup the test/ directory. // module.exports = Generator; function Generator(args, options, config) { yeoman.generators.Base.apply(this, arguments); this.option('assert-framework', { type: String, defaults...
'use strict'; // mocha:app generator // // Sets up the test/ directory // var Generator = module.exports = function (args, options) { this.option('assert-framework', { type: String, defaults: 'chai', desc: 'Choose your prefered assertion library' }); this.option('assert-style', { desc: 'Choose th...
Convert generator to the simple format
Convert generator to the simple format
JavaScript
bsd-2-clause
yeoman/generator-mocha,yeoman/generator-mocha
17aab292abe123e4812a09c41e3a68762213f432
src/victory-primitives/box.js
src/victory-primitives/box.js
import React from "react"; import PropTypes from "prop-types"; import { assign } from "lodash"; import CommonProps from "./common-props"; export default class Box extends React.Component { static propTypes = { ...CommonProps, groupComponent: PropTypes.element, horizontal: PropTypes.bool, width: PropT...
import React from "react"; import PropTypes from "prop-types"; import { assign } from "lodash"; import CommonProps from "./common-props"; export default class Box extends React.Component { static propTypes = { ...CommonProps, groupComponent: PropTypes.element, height: PropTypes.number, width: PropTyp...
Add missing height prop to PropTypes.
Add missing height prop to PropTypes.
JavaScript
mit
FormidableLabs/victory-core,FormidableLabs/victory-core
b4c12ea5777db86718f7bcbf17836e53070f7ed8
lib/ember-addon.js
lib/ember-addon.js
var path = require('path'); var fs = require('fs'); var mergeTrees = require('broccoli-merge-trees'); var manifest = require('./manifest'); module.exports = { name: 'broccoli-manifest', initializeOptions: function() { var defaultOptions = { enabled: this.app.env === 'production', appcacheFile: "...
var path = require('path'); var fs = require('fs'); var mergeTrees = require('broccoli-merge-trees'); var fileRemover = require('broccoli-file-remover'); var manifest = require('./manifest'); module.exports = { name: 'broccoli-manifest', initializeOptions: function() { var defaultOptions = { enabled: ...
Exclude index.html and tests from manifest
Exclude index.html and tests from manifest
JavaScript
mit
racido/broccoli-manifest,arenoir/broccoli-manifest,nybblr/broccoli-manifest,matthewlehner/broccoli-manifest
97fa03ff3bf49d09cbd774fc9846b3298d11b2f2
scripts/chris.js
scripts/chris.js
var audio = document.getElementById("chris"); function pauseChris() { audio.pause(); } function playChris() { audio.currentTime = 952; audio.play(); setTimeout(pauseChris, 331000); } function addChrisButton() { var div = document.getElementById("audioContainer"); var button = document.createElement("BUTTON"); ...
var audio = document.getElementById("chris"); function pauseChris() { if (audio.currentTime >= 331000) { audio.pause(); } } function playChris() { audio.currentTime = 952; audio.play(); var interval = setInterval(pauseChris, 1000); } function clearInterval() { clearInterval(interval) } function addChrisButt...
Use interval in Chris button
Use interval in Chris button
JavaScript
mit
nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io
2609a05dec6e32991e1375ad7991e17dae9d262b
server-config.js
server-config.js
module.exports = { port: 3000, internalClientPort: 3001, authKey: 'ASDASD' };
const fs = require('fs'); module.exports = { port: 3000, internalClientPort: 3001, authKey: process.env.AUTH_KEY || fs.readFileSync('/run/secrets/authkey', { encoding: 'utf-8' }).trim() };
Make server auth key configurable
Make server auth key configurable Can be provided with an env var or with a Docker secret named "authkey".
JavaScript
mit
mikko/CentralIntelligence-server
72360c8d6f8c868c9ea88f5f9018e7ff01ad3fb9
lib/methods/raw.js
lib/methods/raw.js
"use strict"; var Base = require('../base') /** * @function raw converts the Base object into a normal javascript wObject, removing internal properties. * It also converts nested objects and rebuilds arrays from objects with nothing but integer keys. * @memberOf Base# * @param {object} [options] * @param {bool...
"use strict"; var Base = require('../base') var isLikeNumber =require('../util').isLikeNumber /** * @function raw converts the Base object into a normal javascript wObject, removing internal properties. * It also converts nested objects and rebuilds arrays from objects with nothing but integer keys. * @memberOf Bas...
Use `!util/isLikeNumber(key)` instead of `key.match(/\D/)`
Use `!util/isLikeNumber(key)` instead of `key.match(/\D/)`
JavaScript
isc
vigour-io/vjs
f9421ab35aecdede1ca8454e231043e9f94edba6
server/config.js
server/config.js
path = require('path'); module.exports = { mongo: { dbUrl: 'https://api.mongolab.com/api/1', // The base url of the MongoLab DB server apiKey: 'gubV4zs5yN-ItUUQDpgUx0pUA98K3MYH', // Our MongoLab API key dbPath: 'mongodb://root:4DaysKillerDemo@ds029979.mongolab.com:29979/paymymeeting'...
path = require('path'); module.exports = { mongo: { dbUrl: 'https://api.mongolab.com/api/1', // The base url of the MongoLab DB server apiKey: 'gubV4zs5yN-ItUUQDpgUx0pUA98K3MYH', // Our MongoLab API key //dbPath: 'mongodb://root:4DaysKillerDemo@ds029979.mongolab.com:29979/paymymeetin...
Add localhost path for MongoDB
Add localhost path for MongoDB
JavaScript
mit
PythagoreLab/PayMyMeeting
8848878d6341abee73b0afcd6670988aeb37ad58
index.js
index.js
var clientio = require("socket.io-client"); var client = clientio.connect(process.env.HOST + ":" + process.env.PORT); var Gpio = require("onoff").Gpio; var slot = {} slot.led1 = new Gpio(14, "out"); client.emit("join-end"); client.on("command", function(data){ console.log("change " + data.key + " status to : " + ...
var clientio = require("socket.io-client"); var hostname = process.env.HOST || "localhost"; var port = process.env.PORT || 3001; var client = clientio.connect(host + ":" + port.toString()); var Gpio = require("onoff").Gpio; var slot = {} slot.led1 = new Gpio(14, "out"); client.emit("join-end"); client.on("command", ...
Fix typo, optional condition for hostname & port
Fix typo, optional condition for hostname & port
JavaScript
mit
herpiko/nf-iot-end
fed7876c125287523fed18c0053f5d4456cacdbd
source/Divider.js
source/Divider.js
(function (enyo, scope) { /** * {@link moon.Divider} is a simply styled component that may be used as a separator * between groups of components. * * @class moon.Divider * @mixes moon.MarqueeSupport * @mixes moon.MarqueeItem * @ui * @public */ enyo.kind( /** @lends moon.Divider.prototype */ { /** * @p...
(function (enyo, scope) { /** * {@link moon.Divider} is a simply styled component that may be used as a separator * between groups of components. * * @class moon.Divider * @mixes moon.MarqueeSupport * @mixes moon.MarqueeItem * @ui * @public */ enyo.kind( /** @lends moon.Divider.prototype */ { /** * @p...
Set content property before DOM is updated.
BHV-12598: Set content property before DOM is updated. Enyo-DCO-1.1-Signed-off-by: Aaron Tam <aaron.tam@lge.com>
JavaScript
apache-2.0
enyojs/moonstone,mcanthony/moonstone,mcanthony/moonstone,mcanthony/moonstone
ad43d8c6a4c83b67b5ca95edbf9093bc89e16882
client/webpack.base.config.js
client/webpack.base.config.js
const path = require('path'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({ inject: 'true', template: 'app/index.html' }); const extractLess = new ExtractTextPlugin({ filename: "...
const path = require('path'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({ inject: 'true', template: 'app/index.html' }); const extractLess = new ExtractTextPlugin({ filename: "...
Make webpack dev server work for nested route paths.
Make webpack dev server work for nested route paths.
JavaScript
mit
katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming
36b0096973cbcdfb00aa5f2562d075a70df6e4a0
src/background.js
src/background.js
'use strict'; chrome.app.runtime.onLaunched.addListener(function() { chrome.runtime.getPlatformInfo(function(info) { // don't render statusbar over app UI on iOS if (info.os === 'cordova-ios' && window.StatusBar) { window.StatusBar.overlaysWebView(false); } // open chr...
'use strict'; chrome.app.runtime.onLaunched.addListener(function() { chrome.runtime.getPlatformInfo(function(info) { // don't render statusbar over app UI on iOS if (info.os === 'cordova-ios' && window.StatusBar) { window.StatusBar.overlaysWebView(false); } // open chr...
Add id to chrome.window api to remember position and size
Add id to chrome.window api to remember position and size
JavaScript
mit
clochix/mail-html5,halitalf/mail-html5,sheafferusa/mail-html5,sheafferusa/mail-html5,b-deng/mail-html5,whiteout-io/mail-html5,b-deng/mail-html5,whiteout-io/mail,halitalf/mail-html5,clochix/mail-html5,whiteout-io/mail,kalatestimine/mail-html5,tanx/hoodiecrow,sheafferusa/mail-html5,whiteout-io/mail-html5,whiteout-io/mail...
fcf75a1589637715c76accbcfc7bb6dd9605ed31
src/background.js
src/background.js
'use strict'; function createTask(chrome, title, note) { let task = 'twodo://x-callback-url/add?task=' + encodeURI(title) + '&note=' + encodeURI(note); chrome.tabs.update({ url: task }); } chrome.browserAction.onClicked.addListener(function(aTab) { chrome.tabs.executeScript(aTab.id, { code: "window.get...
'use strict'; function createTask(chrome, title, note, url) { let task = 'twodo://x-callback-url/add?task=' + encodeURI(title) + '&note=' + encodeURI(note) + '&action=url:' + encodeURI(url); chrome.tabs.update({ url: task }); } chrome.browserAction.onClicked.addListener(function(aTab) { chrome.tabs.executeS...
Set URL action in newly created 2Do Task
Set URL action in newly created 2Do Task Still add any selected text as a note, but use the current tab's URL as the 2Do action instead.
JavaScript
mit
mkleucker/2do-webextension
c3aeac1fd9568ea064f88e92cf16425ba7050f1b
test/app.spec.js
test/app.spec.js
'use strict'; var expect = require('chai').expect; var App = require('../app/scripts/app'); describe('app', function () { it('should initialize app with no arguments', function () { var app = new App(); expect(app).to.have.property('variables'); expect(app.variables).to.have.length(2); expect(app)....
'use strict'; var expect = require('chai').expect; var App = require('../app/scripts/app'); describe('app', function () { it('should initialize app with no arguments', function () { var app = new App(); expect(app).to.have.property('variables'); expect(app.variables).to.have.length(2); expect(app)....
Add test for initializing app with arguments
Add test for initializing app with arguments
JavaScript
mit
caleb531/truthy,caleb531/truthy
e0d8b2aa93bf72a99893e6aaccb8dfbb23085dc2
components/ProgramLine/index.js
components/ProgramLine/index.js
import React from 'react' import PropTypes from 'prop-types' import Moment from 'react-moment' import Link from 'next/link' import generateUrl from 'utils/urlGenerator' import EditButton from 'containers/EditButton' import stylesheet from './style.scss' const ProgramLine = (props) => ( <div className='program-line...
import React from 'react' import PropTypes from 'prop-types' import Moment from 'react-moment' import Link from 'next/link' import Head from 'next/head' import generateUrl from 'utils/urlGenerator' import EditButton from 'containers/EditButton' import stylesheet from './style.scss' const ProgramLine = (props) => ( ...
Move ProgramLine style into head
Move ProgramLine style into head
JavaScript
mit
bmagic/acdh-client
4fe711dc8b18d93b711b5872f92593c37dfe9d7c
static/js/chat.js
static/js/chat.js
"use strict"; function Chat (p_session) { var _session; var self = this; this._queue = []; this.initialize = function (p_session) { // register chat to session p_session.register_chat(self); // attach submit event $("#send-message-form").submit(function(event){ ...
"use strict"; function Chat (p_session) { var _session; var self = this; this._queue = []; this.initialize = function (p_session) { // register chat to session p_session.register_chat(self); // initialize list of users for the send message form if (0 < p_session.othe...
Initialize the select element for sending a message.
Initialize the select element for sending a message.
JavaScript
agpl-3.0
mose/poietic-generator,mose/poietic-generator,mose/poietic-generator
f284b16e5bb43deb3f00a947d5515b515162cfcf
test/rpc-spec.js
test/rpc-spec.js
var assert = require('assert'); var producer = require('../index')().producer; var consumer = require('../index')().consumer; var uuid = require('node-uuid'); var fixtures = { queues: ['test-queue-0'] }; describe('Producer/Consumer RPC messaging:', function() { before(function (done) { return consumer.connect...
var assert = require('assert'); var producer = require('../index')().producer; var consumer = require('../index')().consumer; var uuid = require('node-uuid'); var fixtures = { queues: ['rpc-queue-0'] }; describe('Producer/Consumer RPC messaging:', function() { before(function (done) { return consumer.connect(...
Rename rpc test queue and change rpc message
Rename rpc test queue and change rpc message
JavaScript
mit
dial-once/node-bunnymq
78ad3613e02ed2ab7c848d33d6ff9ad40a0789ff
client/scripts/sw.js
client/scripts/sw.js
const toolbox = require('sw-toolbox'); // Try network but fallback to cache toolbox.router.default = toolbox.networkFirst; // Data should query the network first toolbox.router.any('/api/*', toolbox.networkOnly); // Data should query the network first toolbox.router.any('/auth/*', toolbox.networkOnly);
import {router} from 'sw-toolbox'; // Try network but fallback to cache router.default = toolbox.networkFirst; // Data should query the network first router.any('/api/*', toolbox.networkOnly); // Data should query the network first router.any('/auth/*', toolbox.networkOnly);
Use import rather than require
Use import rather than require
JavaScript
mit
AdaRoseEdwards/81,AdaRoseEdwards/81,AdaRoseEdwards/81
74bd38f424fbdea30488ab5ef33afe5036be6018
script/mylowyat.user.js
script/mylowyat.user.js
// ==UserScript== // @author sk3dsu(Fadli Ishak) // @name MyLowyat // @version 0.2.1 // @description Removing some elements of the forum to be a bit cleaner for SFW. // @namespace https://github.com/mfadliishak/lowyatAvatars // @icon https://forum.lowyat.net/favicon.ico // @ma...
// ==UserScript== // @author sk3dsu(Fadli Ishak) // @name MyLowyat // @version 0.2.2 // @description Removing some elements of the forum to be a bit cleaner for SFW. // @namespace https://github.com/mfadliishak/lowyatAvatars // @icon https://forum.lowyat.net/favicon.ico // @ma...
Fix Remove banner still showing, use inline css instead.
Fix Remove banner still showing, use inline css instead.
JavaScript
mit
mfadliishak/mylowyat
22f41b9cfcf10af245b9bb185d9eb04c2fa82da6
lib/rules/space-after-comma.js
lib/rules/space-after-comma.js
'use strict'; var helpers = require('../helpers'); module.exports = { 'name': 'space-after-comma', 'defaults': { 'include': true }, 'detect': function (ast, parser) { var result = []; ast.traverseByTypes(['operator', 'delimiter'], function (operator, i, parent) { var next; if (operat...
'use strict'; var helpers = require('../helpers'); module.exports = { 'name': 'space-after-comma', 'defaults': { 'include': true }, 'detect': function (ast, parser) { var result = []; ast.traverseByTypes(['operator', 'delimiter'], function (operator, i, parent) { var next, doubleN...
Refactor rule to work with gonzales 3.2.1
:art: Refactor rule to work with gonzales 3.2.1
JavaScript
mit
sasstools/sass-lint,flacerdk/sass-lint,bgriffith/sass-lint,sktt/sass-lint,srowhani/sass-lint,DanPurdy/sass-lint,sasstools/sass-lint,srowhani/sass-lint
a39aa576808891460fd674345162cecf57a45ee8
examples/configs/webpack-base.config.js
examples/configs/webpack-base.config.js
/* eslint-disable global-require */ const path = require('path'); const CircularDependencyPlugin = require('circular-dependency-plugin'); const CleanWebpackPlugin = require('clean-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const webpack = require('webpack'); const babelConfig = require(...
/* eslint-disable global-require */ const path = require('path'); const CircularDependencyPlugin = require('circular-dependency-plugin'); const CleanWebpackPlugin = require('clean-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const webpack = require('webpack'); const babelConfig = require(...
Remove babel-polyfill from vendor bundle
build(webpack): Remove babel-polyfill from vendor bundle
JavaScript
mit
nickjohnson-dev/dawww
57079e22ece4cde0aef427eee163810a141c4731
config/assets/cloud-foundry.js
config/assets/cloud-foundry.js
'use strict'; module.exports = { client: { lib: { css: [ 'public/lib/bootstrap/dist/css/bootstrap.min.css', 'public/lib/bootstrap/dist/css/bootstrap-theme.min.css', ], js: [ 'public/lib/angular/angular.min.js', 'public/lib/angular-resource/angular-resource.min.js...
'use strict'; module.exports = {};
Remove non CF specific files
Remove non CF specific files
JavaScript
mit
duppercloud/mean,edwardt4482/customerRates,Karma-Tech-Consulting/recipes,NicolasKovalsky/mean,amoundr/doctorNet,mc-funk/exostie-device-sim-js,shteeven/scradio,cleargif/mean,lirantal/vault,ChristopherJones72521/KHE2015,spacetag/TechEx_Josiah_2,devypt/mean,Boonda-P/newmean,ryanjbaxter/mean,helaili/automatic-octo-spork,et...
466ab72d4d10df22740968461398b588b13cc909
tempLog_server.js
tempLog_server.js
var fs = require('fs'); var intervalId = setInterval(function() { fs.readFile('/sys/class/thermal/thermal_zone0/temp', function(err, data) { var date = new Date(); var temp = data / 1000; var newData = date + ',' + temp + '\n'; fs.appendFile('./data-log.csv', newData, function(err) ...
var fs = require('fs'); var intervalId = setInterval(function() { fs.readFile('/sys/class/thermal/thermal_zone0/temp', function(err, data) { var date = new Date(); var temp = data / 1000; var newData = date + ',' + temp + '\n'; fs.appendFile('./data-log.csv', newData, function(err) ...
Remove the count and added a feedback when started
Remove the count and added a feedback when started
JavaScript
mit
DevinCarr/piTemp,DevinCarr/piTemp
af50546f56a995ae69158bed8679eed9a2b69894
app/assets/party/profile.js
app/assets/party/profile.js
'use strict'; app.controller('party/profile', [ '$scope', 'displayService', 'party', 'pageService', function ($scope, display, party, page) { $scope.clickUser = function(user){ _.each($scope.volumes, function(v, i){ $scope.volumes[i].selectedClass = (v.users.indexOf(user.id) > -1) ? "volumeSelec...
'use strict'; app.controller('party/profile', [ '$scope', 'displayService', 'party', 'pageService', function ($scope, display, party, page) { // This function takes in a user, and loops through // volumes, and attaches a "volumeSelected" class // to all the pertinent volumes. $scope.clickUser ...
Add comments and fix formatting.
Add comments and fix formatting.
JavaScript
agpl-3.0
databrary/databrary,databrary/databrary,databrary/databrary,databrary/databrary
f084957ab6edc9c70333bc83637271730cf3c036
src/finalisers/shared/getExportBlock.js
src/finalisers/shared/getExportBlock.js
function propertyAccess ( name ) { return name === 'default' ? `['default']` : `.${name}`; } export default function getExportBlock ( bundle, exportMode, mechanism = 'return' ) { if ( exportMode === 'default' ) { const defaultExportName = bundle.exports.lookup( 'default' ).name; return `${mechanism} ${defaultEx...
function wrapAccess ( id ) { return ( id.originalName !== 'default' && id.module && id.module.isExternal ) ? id.module.name + propertyAccess( id.originalName ) : id.name; } function propertyAccess ( name ) { return name === 'default' ? `['default']` : `.${name}`; } export default function getExportBlock ( bundle,...
Access reexports of externals safely when needed.
Access reexports of externals safely when needed.
JavaScript
mit
lukeapage/rollup,Victorystick/rollup,alalonde/rollup,Permutatrix/rollup,corneliusweig/rollup
f29302c93dfb5b6e41193a14e82552a04cc9177e
MUMPSCompiler.js
MUMPSCompiler.js
'use strict'; const fs = require('fs'); const util = require('util'); const _ = require('lodash'); const LineTokens = require('./LineTokens'); const AbstractSyntaxTree = require('./AbstractSyntaxTree'); class MUMPSCompiler { readFile(fileName) { return fs.readFileSync(fileName, 'utf8').split('\n'); } ...
'use strict'; const fs = require('fs'); const util = require('util'); const _ = require('lodash'); const LineTokens = require('./LineTokens'); const AbstractSyntaxTree = require('./AbstractSyntaxTree'); class MUMPSCompiler { readFile(fileName) { return fs.readFileSync(fileName, 'utf8').split('\n'); } ...
Restructure the creation of the AST
Restructure the creation of the AST
JavaScript
apache-2.0
mfuroyama/mumps-compiler
102b402570437fa38dfbd4d5afb94115aaa495dc
public/test/spec/config_spec.js
public/test/spec/config_spec.js
define(['config'], function(config) { 'use strict'; describe('config module', function() { it('should allow values to be functions with returns', function() { config.option('fn_test', function() { return (1 + 2 + 3) / 4; }); expect(config.fn_test).toEqual(1.5); }); it('should force boolean...
define(['config'], function(config) { 'use strict'; describe('config module', function() { it('should allow values to be functions with returns', function() { config._priv.set_option('fn_test', function() { return (1 + 2 + 3) / 4; }); expect(config.fn_test).toEqual(1.5); }); it('should for...
Fix config unit tests with methods moved to _priv (see commit ef68784)
Fix config unit tests with methods moved to _priv (see commit ef68784)
JavaScript
mit
gavinhungry/debugger.io,gavinhungry/debugger.io
0dd80408bb9b2ab204f984b8f16f964cef6ab629
src/test/integration-test.js
src/test/integration-test.js
!function (assert, path) { 'use strict'; require('vows').describe('Integration test').addBatch({ 'When minifying a CSS file': { topic: function () { var callback = this.callback, topic; require('publishjs')({ cache: fa...
!function (assert, path) { 'use strict'; require('vows').describe('Integration test').addBatch({ 'When minifying a CSS file': { topic: function () { var callback = this.callback, topic; require('publishjs')({ cache: fa...
Use build() result for test
Use build() result for test
JavaScript
mit
candrholdings/publishjs-less,candrholdings/publishjs-less
6a5bac62634300a1f34977694840d1cfa1154fd6
assets/js/adminselection.js
assets/js/adminselection.js
function editselection(adminname, adminusername, adminpassword, adminid){ document.getElementById("inputadminname").value = adminname; document.getElementById("inputadminusername").value = adminusername; document.getElementById("inputadminpassword").value = adminpassword; document.getElementById("inputadminadminid"...
function editselection(adminname, adminusername, adminpassword, adminid){ document.getElementById("inputadminname").value = adminname; document.getElementById("inputadminusername").value = adminusername; document.getElementById("inputadminpassword").value = adminpassword; document.getElementById("inputadminadminid"...
Add changeyear() and commented on selected functions.
Add changeyear() and commented on selected functions.
JavaScript
mit
altusgerona/cmsc127project,altusgerona/cmsc127project,altusgerona/cmsc127project
a7c61ddb11083242d38c64e6db4f6de2e0dd76d1
app/lib/stub-router-context.js
app/lib/stub-router-context.js
import _ from 'lodash'; import React from 'react/addons'; var stubRouterContext = (Component, props, stubs) => { return React.createClass({ childContextTypes: { getCurrentPath: React.PropTypes.func, getCurrentRoutes: React.PropTypes.func, getCurrentPathname: React.PropTypes.func, getCurre...
import _ from 'lodash'; import React from 'react/addons'; var stubRouterContext = (Component, props, stubs) => { return React.createClass({ childContextTypes: { getCurrentPath: React.PropTypes.func, getCurrentRoutes: React.PropTypes.func, getCurrentPathname: React.PropTypes.func, getCurre...
Add ref to stub router component for accessibility
Add ref to stub router component for accessibility
JavaScript
isc
jeffreymoya/sprintly-kanban,pipermerriam/sprintly-kanban,pipermerriam/sprintly-kanban,florapdx/sprintly-kanban,datachand/sprintly-kanban,sprintly/sprintly-kanban,datachand/sprintly-kanban,sprintly/sprintly-kanban,whitebird08/sprintly-kanban,whitebird08/sprintly-kanban,jeffreymoya/sprintly-kanban,florapdx/sprintly-kanba...
fd0b38cd3e80b84fc0d9965d61e849d507203e41
app/assets/javascripts/views/user/mega_drop.js
app/assets/javascripts/views/user/mega_drop.js
Teikei.module("User", function(User, App, Backbone, Marionette, $, _) { User.MegaDropView = Marionette.View.extend({ el: "#mega-drop", ui: { toggle: ".toggle", slider: ".slider", toggleText: ".toggle b" }, isOpen: false, events: { "click .toggle": "toggleDropdown", ...
Teikei.module("User", function(User, App, Backbone, Marionette, $, _) { User.MegaDropView = Marionette.View.extend({ el: "#mega-drop", ui: { toggle: ".toggle-button", slider: ".slider", toggleText: ".toggle-button b" }, isOpen: false, events: { "click .toggle-button": ...
Fix a bug in the mega-drop that prevented it opening.
Fix a bug in the mega-drop that prevented it opening.
JavaScript
agpl-3.0
sjockers/teikei,sjockers/teikei,teikei/teikei,sjockers/teikei,teikei/teikei,teikei/teikei
e2c43007eec0e388425f4fc07693fae1b33fa775
webpack.config.js
webpack.config.js
const HtmlWebpackPlugin = require('html-webpack-plugin'); const path = require('path'); module.exports = { entry: './client/index.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [new HtmlWebpackPlugin({ title: 'Beer.ly' })] }
const HtmlWebpackPlugin = require('html-webpack-plugin'); const path = require('path'); module.exports = { entry: './client/index.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [new HtmlWebpackPlugin({ title: 'Beer.ly', template: './client/index.ejs', ...
Add HtmlWebpackPlugin options for template and script injection
Add HtmlWebpackPlugin options for template and script injection
JavaScript
mit
ntoung/beer.ly,ntoung/beer.ly
576da3b37112a0eba4ff1ab61f0029c66a8a66a4
app/javascript/app/pages/ndcs/ndcs-reducers.js
app/javascript/app/pages/ndcs/ndcs-reducers.js
export const initialState = { loading: false, loaded: false, error: false, data: {} }; const setLoading = (state, loading) => ({ ...state, loading }); const setError = (state, error) => ({ ...state, error }); const setLoaded = (state, loaded) => ({ ...state, loaded }); export default { fetchNDCSInit: state ...
export const initialState = { loading: false, loaded: false, error: false, data: {} }; const setLoading = (state, loading) => ({ ...state, loading }); const setError = (state, error) => ({ ...state, error }); const setLoaded = (state, loaded) => ({ ...state, loaded }); export default { fetchNDCSInit: state ...
Create mapCategories on ndcs reducer
Create mapCategories on ndcs reducer
JavaScript
mit
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
05b841b505d91a974a06bb20ae78652cbb9b48e6
src/index.js
src/index.js
import React from 'react' import { render } from 'react-dom' import { Provider } from 'react-redux' import { Router, Route } from 'react-router' import config from 'react-global-configuration' //views import HomePage from './views/Home' import ListPageContainer from './views/List' //store import { store, history } fr...
import React from 'react' import { render } from 'react-dom' import { Provider } from 'react-redux' import { Router, Route } from 'react-router' import config from 'react-global-configuration' //views import HomePage from './views/Home' import ListPageContainer from './views/List' //store import { store, history } fr...
Update config for plugin (still needs moving outside this lib)
Update config for plugin (still needs moving outside this lib)
JavaScript
mit
aerian-studios/react-crud
74ee10552c8791941df3c436dddf25ba2680cc78
tests/integration/components/permission-language-test.js
tests/integration/components/permission-language-test.js
import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('permission-language', 'Integration | Component | permission language', { integration: true }); test('it renders', function(assert) { // Set any properties with this.set('myProperty', 'value')...
import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; import Ember from 'ember'; moduleForComponent('permission-language', 'Integration | Component | permission language', { integration: true }); test('it renders', function(assert) { // Set any properties with this...
Add Component testing for permission-language component. The test passes three provider names to the component and verify that the returned results is correct.
Add Component testing for permission-language component. The test passes three provider names to the component and verify that the returned results is correct. Ticket ID: EOSF-403
JavaScript
apache-2.0
CenterForOpenScience/ember-preprints,laurenrevere/ember-preprints,caneruguz/ember-preprints,CenterForOpenScience/ember-preprints,baylee-d/ember-preprints,baylee-d/ember-preprints,caneruguz/ember-preprints,laurenrevere/ember-preprints
907f0b008587aadbcaf1da93491662e874a0301d
share/spice/canistreamit/spice.js
share/spice/canistreamit/spice.js
function ddg_spice_canistreamit(movies) { // console.log(xk); var result,img,snippet,link,div; var items = new Array(); for(var i = 0; i<movies.length; i++) { result = movies[i]; // Make title for header var header = result.title + " ("+result.year+")"; ...
function ddg_spice_canistreamit(movies) { // console.log(xk); var result,img,snippet,link,div; var items = new Array(); for(var i = 0; i<movies.length; i++) { result = movies[i]; // Make title for header var header = 'Watch ' + result.title + " ("+result.yea...
Add watch to Canistreamit header.
Add watch to Canistreamit header.
JavaScript
apache-2.0
andrey-p/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,soleo/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,deserted/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,mr-karan/zer...
c63cc693b7854745c2abdd8eea55dd695c669821
Core/BaseLoader.js
Core/BaseLoader.js
const fetch = require('node-fetch'); class BaseLoader { constructor(APIToken, baseURL) { this.APIToken = APIToken; this.fetch = fetch this.baseURL = baseURL } get fetchConfiguration() { const headers = { Authorization: `Bearer ${this.APIToken}`, }; const configuration = { me...
const fetch = require("node-fetch"); class BaseLoader { constructor(APIToken, baseURL) { this.APIToken = APIToken; this.fetch = fetch; this.baseURL = baseURL; } get fetchConfiguration() { const headers = { Authorization: `Bearer ${this.APIToken}` }; const configuration = { me...
Add status code check for error handling
Add status code check for error handling
JavaScript
mit
dbsystel/1BahnQL
e12a57b8d5c005bbb4e7a4f4f98638aa70df3562
web/static/js/components/game/header.js
web/static/js/components/game/header.js
import React, {PropTypes} from 'react'; export default class Header extends React.Component { _renderContent() { const { game } = this.props; return ( <h1>Place your ships</h1> ); } render() { return ( <header id="game_header">{::this._renderContent()}</header> ); } }
import React, {PropTypes} from 'react'; export default class Header extends React.Component { _renderContent() { const { game } = this.props; const title = this._titleText(game); return ( <h1>{::this._titleText(game)}</h1> ); } _titleText(game) { const { my_board, opponents_board } = ...
Set title depending on boards statuses
Set title depending on boards statuses
JavaScript
mit
bigardone/phoenix-battleship,bigardone/phoenix-battleship
f65d07bd4493f4af71e30722f496bbef8f37832c
src/js/utils/code-list-utils.js
src/js/utils/code-list-utils.js
export function nbCodesFromId(codeListById, id) { return id ? nbCodes(codeListById[id]) : 0 } function nbCodes({ isSpec, isLoaded, codes }) { return isSpec && !isLoaded ? 10 : codes.length }
/** * Returns the number of code in a code list from its `id` * * For a code list specification, it returns `1`. * If the `id` is not provided, it returns `1`. * * Explanations : * * For a code list specification which has not been loaded yet, we do not know * the number of codes in the code list. We need this...
Use 1 as a default value for the number of codes in a code list
Use 1 as a default value for the number of codes in a code list This number is used to build the right number of responses when serializing the questionnaire. If we work with a code list specification, It's not trivial to get this information: we need to load the code list specificaiton before serializing the question...
JavaScript
mit
Zenika/Pogues,Zenika/Pogues,InseeFr/Pogues,InseeFr/Pogues,InseeFr/Pogues,Zenika/Pogues
97290f01c55a2426856d4c9fe095760bf2483e44
src/components/Menu.js
src/components/Menu.js
import React from 'react'; import { Link } from 'react-router'; import './Menu.css'; import User from './User'; import language from '../language/language'; const menuLanguage = language.components.menu; let Menu = React.createClass ({ getInitialState() { return { showUser: false }; }, onClick(e) { ...
import React from 'react'; import { Link } from 'react-router'; import './Menu.css'; import User from './User'; import language from '../language/language'; const menuLanguage = language.components.menu; let Menu = React.createClass ({ getInitialState() { return { showUser: false }; }, toggleUser(e) { ...
Rename click handler function so it’s more explicit what it does
Rename click handler function so it’s more explicit what it does
JavaScript
bsd-3-clause
jeromelachaud/Last.fm-Activities-React,jeromelachaud/Last.fm-Activities-React
bd26a8c14f8f1f44a6ad745cf93af2a9898299e7
src/main/webapp/scripts/main.js
src/main/webapp/scripts/main.js
$().ready(() => { loadContentSection().then(() =>{ $("#loader").addClass("hide"); $("#real-body").removeClass("hide"); $("#real-body").addClass("body"); $(".keyword").click(function() { $(this).addClass("active"); $(".base").hide(200); $("#real-body").addClass("focus"); }); ...
$().ready(() => { loadContentSection().then(() =>{ $("#loader").addClass("hide"); $("#real-body").removeClass("hide"); $("#real-body").addClass("body"); $(".keyword").click(function() { $(this).addClass("active"); $(".base").hide(200); $("#real-body").addClass("focus"); $(".a...
Fix redirecting and back button bug
Fix redirecting and back button bug
JavaScript
apache-2.0
googleinterns/step36-2020,googleinterns/step36-2020,googleinterns/step36-2020
fe88f534341eabeff89313ae046a2be48043833f
client/src/components/NavBar.js
client/src/components/NavBar.js
import React from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { logoutUser } from '../../redux/actions'; const NavBar = ({ isAuthenticated, logoutUser }) => ( <ul className="navbar"> <li className="navbar__link"><Link to="/">Home</Link></li> { is...
import React from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { logoutUser } from '../../redux/actions'; const NavBar = ({ isAuthenticated, logoutUser }) => ( <ul className="navbar"> <li key={0} className="navbar__link"><Link to="/">Home</Link></li> ...
Fix React missing key iterator warning
Fix React missing key iterator warning
JavaScript
mit
mbchoa/presence,mbchoa/presence
942b75631721f83ac139bf08eb4712718630d552
main.js
main.js
var STATUSES = { UP: 0, DOWN: 1 } var mouseStatus = { left: STATUSES.UP, right: STATUSES.UP } var BUTTONS = { LEFT: 1, RIGHT: 3 }; document.onmousedown = function(event) { if (event.which === BUTTONS.LEFT) { mouseStatus.left = STATUSES.DOWN; if (mouseStatus.right === STATUSES.DOWN) { chrom...
var STATUSES = { UP: 0, DOWN: 1 } var mouseStatus = { left: STATUSES.UP, right: STATUSES.UP } var BUTTONS = { LEFT: 1, RIGHT: 3 }; document.addEventListener('mousedown', function(event) { if (event.which === BUTTONS.LEFT) { mouseStatus.left = STATUSES.DOWN; if (mouseStatus.right === STATUSES.DOW...
Use addEventListener instead of setting old onmouse* properties
Use addEventListener instead of setting old onmouse* properties
JavaScript
isc
wendorf/mousetures,wendorf/mousetures
1b63df7382dea64feaa9d22ba415b141837277fc
main.js
main.js
define(['mathlive/mathlive'], function(mLive) { MathLive = mLive; MathLive.renderMathInDocument(); TheActiveMathField = MathLive.makeMathField( document.getElementById('mathEditorActive'), {//commandbarToggle: 'hidden', overrideDefaultInlineShortcuts: false, onSelectionDidChange: Updat...
define(['mathlive/mathlive'], function(mLive) { MathLive = mLive; MathLive.renderMathInDocument(); TheActiveMathField = MathLive.makeMathField( document.getElementById('mathEditorActive'), {commandbarToggle: 'hidden', overrideDefaultInlineShortcuts: false, onSelectionDidChange: UpdateP...
Add handler for cntl+backspace/delete to be a crossout
Add handler for cntl+backspace/delete to be a crossout
JavaScript
mit
NSoiffer/ProceduralMathEditor,NSoiffer/ProceduralMathEditor
426fc75610582bbcfad0a8d1cac575e400419326
lib/store.js
lib/store.js
var uuid = require('node-uuid'); var JSData = require('js-data'); var store; var adapter; var Report; function error(msg) { return new Promise(function(resolve, reject) { return resolve({ error: msg }); }); } function get(id) { if (!id) return error('No id specified.'); if (!adapter) { return new Pr...
var uuid = require('node-uuid'); var JSData = require('js-data'); var store; var adapter; var Report; function error(msg) { return new Promise(function(resolve, reject) { return resolve({ error: msg }); }); } function get(id) { if (!id) return error('No id specified.'); if (!adapter) { return new Pr...
Add more data to the report
Add more data to the report
JavaScript
mit
zalmoxisus/remotedev-server,zalmoxisus/remotedev-server
be3833211473eaa2f24e4f8ef20af9969d2bd0d0
webpack.config.js
webpack.config.js
const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); const path = require("path"); module.exports = { mode: "development", devtool: "inline-source-map", entry: { IntelliSearch: "./src/SearchClient.ts", "IntelliSearch.min": "./src/SearchClient.ts" }, output: { path: pat...
const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); const path = require("path"); module.exports = { mode: "development", devtool: "inline-source-map", entry: { IntelliSearch: "./src/SearchClient.ts", "IntelliSearch.min": "./src/SearchClient.ts" }, output: { path: pat...
Remove comments and source-map from the minified version.
Remove comments and source-map from the minified version.
JavaScript
mit
IntelliSearch/search-client,IntelliSearch/search-client
68e3266af5daacee80d207b14ea123898c201b0b
webpack.config.js
webpack.config.js
var ExtractTextPlugin = require('extract-text-webpack-plugin'); module.exports = { entry: { index: './src/main/index.js' }, output: { path: './target/out', filename: '[name].js', libraryTarget: 'commonjs' }, externals: [ { 'react': true, 'react-dom': true } ], plugins:...
var path = require('path'), ExtractTextPlugin = require('extract-text-webpack-plugin'); module.exports = { entry: { index: [ './src/main/index.js', './src/main/index.less' ] }, output: { path: './target/out', filename: '[name].js', libraryTarget: 'commonjs' }, externals: [...
Build styles apart from JS code
Build styles apart from JS code
JavaScript
mit
smikhalevski/react-text-input,smikhalevski/react-text-input
5113f6ac77db5315c9b311505f86a3dc1e627204
fetch.js
fetch.js
const fs = require('fs'); const path = require('path'); const exec = require('child_process').exec; const version = process.versions.v8; const tmpfile = path.join(__dirname, version+'.flags.json'); if (!fs.existsSync(tmpfile)) { exec('node --v8-options', function (execErr, result) { var flags; if (execErr) ...
const fs = require('fs'); const path = require('path'); const exec = require('child_process').exec; const nodepath = process.env._; const version = process.versions.v8; const tmpfile = path.join(__dirname, version+'.flags.json'); if (!fs.existsSync(tmpfile)) { exec(nodepath+' --v8-options', function (execErr, resul...
Use node path from process.env._
Fix: Use node path from process.env._
JavaScript
mit
tkellen/js-v8flags,js-cli/js-v8flags
ca7e4f4c5d6ba470b557e87c47b7f298ce40437e
audio_channel.js
audio_channel.js
var AudioChannel = function(args) { this.context = AudioContext ? new AudioContext() : new webkitAudioContext(); this.oscill = this.context.createOscillator(); this.gain = this.context.createGain(); if(args) { this.frequency = args.freq ? args.freq : 220; this.wave = args.wave ? args.wave : "triangle";...
var AudioChannel = function(args) { this.context = AudioContext ? new AudioContext() : new webkitAudioContext(); this.oscill = this.context.createOscillator(); this.gain = this.context.createGain(); var args = args ? args : {}; this.frequency = args.freq ? args.freq : 220; this.wave = args.wave ? args.wav...
Update AudioChannel.playSong to use noteToFreq
Update AudioChannel.playSong to use noteToFreq
JavaScript
mit
peternatewood/pac-man-replica,peternatewood/pac-man-replica
b44662de07df147bc64fb439db554f5d045cbb5e
api/models/Image.js
api/models/Image.js
/** * Image.js * * @description :: This represents a product image with file paths for different variations (original, thumb, ...). * @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models */ module.exports = { attributes: { width: { type: 'integer', min: 0 }, ...
/** * Image.js * * @description :: This represents a product image with file paths for different variations (original, thumb, ...). * @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models */ module.exports = { attributes: { width: { type: 'integer', min: 0 }, ...
Fix bug where images could not be created
Fix bug where images could not be created
JavaScript
mit
joschaefer/online-shop-api
1eede171c8f8d0d8e141832414d258708fac9579
lib/index.js
lib/index.js
"use strict"; function createDefaultFormatter() { return function defaultFormatter(ctx, errors) { ctx.body = {}; if (errors && errors.length) { ctx.status = 500; if (errors.length === 1) { ctx.status = errors[0].status; } ctx.body['ok'] = 0; ctx.body['status'] = ctx.stat...
"use strict"; function createDefaultFormatter() { return function defaultFormatter(ctx, errors) { ctx.body = {}; if (errors && errors.length) { ctx.status = 500; if (errors.length === 1) { ctx.status = errors[0].status || ctx.status; } ctx.body['ok'] = 0; ctx.body['statu...
Add status fallback when an error does not expose one
Add status fallback when an error does not expose one
JavaScript
mit
njakob/koa-formatter
7e05dc3eafd6a5ba970624b242d00bd139ec46eb
docs/src/lib/docs/md-loader.js
docs/src/lib/docs/md-loader.js
const fm = require('gray-matter'); // makes mdx in next.js suck less by injecting necessary exports so that // the docs are still readable on github // (Shamelessly stolen from Expo.io docs) // @see https://github.com/expo/expo/blob/master/docs/common/md-loader.js module.exports = async function (src) { const callba...
const fm = require('gray-matter'); // makes mdx in next.js suck less by injecting necessary exports so that // the docs are still readable on github // (Shamelessly stolen from Expo.io docs) // @see https://github.com/expo/expo/blob/master/docs/common/md-loader.js module.exports = async function (src) { const callba...
Enable fast refresh on mdx pages
Enable fast refresh on mdx pages
JavaScript
apache-2.0
jaredpalmer/formik,jaredpalmer/formik,jaredpalmer/formik
d6b653841d6b3553acdda2cf721e4be9b751bc24
static/js/page_index.js
static/js/page_index.js
"use strict"; $(document).ready(function() { $("#link_play").click(function (event) { $.cookie("user_name", $("#credentials").find("input#username").val()); return true; }); });
"use strict"; $(document).ready(function() { $("#link_play").click(function (event) { $.cookie( "user_name", $("#credentials").find("input#username").val(), {path: "/page/"} ); return true; }); });
Set user name cookie only for the /page/ path where it is used.
Set user name cookie only for the /page/ path where it is used.
JavaScript
agpl-3.0
mose/poietic-generator,mose/poietic-generator,mose/poietic-generator
40a85d221a90d4af0fe4377b77eaf9f10348a5c5
bin/gitter-bot.js
bin/gitter-bot.js
var program = require('commander'); var pkg = require('../package.json'); var GitterBot = require('../lib/GitterBot'); program .version(pkg.version) .description('Gitter bot for evaluating expressions') .usage('[options]') .option('-k, --key <key>', 'Set API key') .option('-r, --room <room>', 'Set room') ....
var program = require('commander'); var pkg = require('../package.json'); var GitterBot = require('../lib/GitterBot'); program .version(pkg.version) .description('Gitter bot for evaluating expressions') .usage('[options]') .option('-k, --key <key>', 'Set API key') .option('-r, --room <room>', 'Set room') ....
Add overriding pattern from CLI
Add overriding pattern from CLI
JavaScript
mit
ghaiklor/uwcua-vii
25103c5b77422b369c9e1171fa0f03d9ed8dd337
src/jsx/routes/portfolio/index.js
src/jsx/routes/portfolio/index.js
import echoRidge from './echo-ridge'; import fireflies from './fireflies'; export default [ echoRidge, fireflies ];
export default [ require('./echo-ridge').default, require('./fireflies').default ];
Clean up the portfolio imports
Clean up the portfolio imports
JavaScript
mit
VoxelDavid/voxeldavid-website,VoxelDavid/voxeldavid-website,vocksel/my-website,vocksel/my-website
d5b71ae723decdf033d995247ee76a103df800ff
index.js
index.js
"use strict"; module.exports = { rules: { "sort-object-props": function(context) { var caseSensitive = context.options[0].caseSensitive; var ignoreMethods = context.options[0].ignoreMethods; var ignorePrivate = context.options[0].ignorePrivate; var MSG = "Pr...
"use strict"; module.exports = { rules: { "sort-object-props": function(context) { var caseSensitive = context.options[0].caseSensitive; var ignoreMethods = context.options[0].ignoreMethods; var ignorePrivate = context.options[0].ignorePrivate; var MSG = "Pr...
Add checking if lastPropId is undefined
Add checking if lastPropId is undefined
JavaScript
mit
shane-tomlinson/eslint-plugin-sorting,jacobrask/eslint-plugin-sorting
a23126cf3c1f6dc74d6759d33d238e8bcd80f2fb
cantina-vhosts.js
cantina-vhosts.js
module.exports = function (app) { // Default conf. app.conf.add({ vhosts: { match: 'hostname', notFound: true } }); // Depends on cantina-web. app.require('cantina-web'); // Load stuff. app.load('plugins'); app.load('middleware'); };
module.exports = function (app) { // Default conf. app.conf.add({ vhosts: { match: 'hostname', middleware: true, notFound: true } }); // Depends on cantina-web. app.require('cantina-web'); // Load stuff. app.load('plugins'); if (app.conf.get('vhosts:middleware')) { app.lo...
Allow middleware to be disabled.
Allow middleware to be disabled.
JavaScript
apache-2.0
cantina/cantina-vhosts
56f30e597acc3cef1380f287531ba2f75668498d
index.js
index.js
/* * redbloom * Copyright(c) 2016 Benjamin Bartolome * Apache 2.0 Licensed */ 'use strict'; module.exports = redbloom; var ee = require('event-emitter'); var Immutable = require('immutable'); var Rx = require('rx'); function redbloom(initialState, options) { var state = Immutable.Map(initialState || {}); // ...
/* * redbloom * Copyright(c) 2016 Benjamin Bartolome * Apache 2.0 Licensed */ 'use strict'; module.exports = redbloom; var ee = require('event-emitter'); var Immutable = require('immutable'); var Rx = require('rx'); function redbloom(initialState, options) { var state = Immutable.Map(initialState || {}); // ...
Handle the default pattern with the last state when the command is not mathcing.
fix: Handle the default pattern with the last state when the command is not mathcing.
JavaScript
apache-2.0
eq8/redbloom
1d9e4ee3231173d5acaf96dbce94a7529b15396b
index.js
index.js
'use strict'; const net = require('net'); const isAvailable = options => new Promise((resolve, reject) => { const server = net.createServer(); server.unref(); server.on('error', reject); server.listen(options, () => { const {port} = server.address(); server.close(() => { resolve(port); }); }); }); const...
'use strict'; const net = require('net'); const isAvailable = options => new Promise((resolve, reject) => { const server = net.createServer(); server.unref(); server.on('error', reject); server.listen(options, () => { const {port} = server.address(); server.close(() => { resolve(port); }); }); }); const...
Use the correct `host` when falling back
Use the correct `host` when falling back
JavaScript
mit
sindresorhus/get-port,sindresorhus/get-port
f23074f8943c95085c164455b3816c48940cc365
index.js
index.js
/* jshint node: true */ 'use strict'; module.exports = { name: 'telling-stories', included: function(app) { if (!this.shouldIncludeFiles()) { return; } this._super.included.apply(this, arguments); app.import('vendor/telling-stories/qunit-configuration.js', { type: 'test' }); app.import...
/* jshint node: true */ 'use strict'; module.exports = { name: 'telling-stories', included: function(app) { if (!this.shouldIncludeFiles()) { return; } this._super.included.apply(this, arguments); app.import('vendor/telling-stories/qunit-configuration.js', { type: 'test' }); app.import...
Validate if app.tests are available
Validate if app.tests are available Instead of relying on the environment
JavaScript
mit
mvdwg/telling-stories,mvdwg/telling-stories
821f52c62015f457b98086643a49f2a000d9b033
index.js
index.js
#!/usr/bin/env node global.__base = __dirname + '/src/'; // Commands var cli = require('commander'); cli .version('0.0.1') .option('-p, --port <port>' , 'Change static server port [8000]', 8000) .option('-P, --livereload-port <port>' , 'Change livereload port [35729]', 35729) .option('-d, --direct...
#!/usr/bin/env node global.__base = __dirname + '/src/'; // Commands var cli = require('commander'); cli .version('0.0.1') .option('-p, --port <port>' , 'Change static server port [8000]', 8000) .option('-P, --livereload-port <port>' , 'Change livereload port [35729]', 35729) .option('-d, --direct...
Fix error if trying to do slr in current dir
Fix error if trying to do slr in current dir
JavaScript
mit
eth0lo/slr
458ec938cf110488e3e1caca6738d837b95eae8a
index.js
index.js
'use strict'; var p4 = require('node-perforce'); var through = require('through2'); var gutil = require('gulp-util'); var PluginError = gutil.PluginError; var PLUGIN_NAME = 'gulp-p4'; module.exports = function (p4cmd, options) { if (!p4cmd) throw new PluginError(PLUGIN_NAME, 'Missing p4 command'); if (!p4[p4cmd]...
'use strict'; var p4 = require('node-perforce'); var through = require('through2'); var gutil = require('gulp-util'); var PluginError = gutil.PluginError; var PLUGIN_NAME = 'gulp-p4'; module.exports = function (p4cmd, options) { if (!p4cmd) throw new PluginError(PLUGIN_NAME, 'Missing p4 command'); if (!p4[p4cmd]...
Fix to work with trail pipes
Fix to work with trail pipes
JavaScript
mit
wokim/gulp-p4
3c75375bf0c61e544c8f720ab4a5c2da7f495abd
index.js
index.js
#!/usr/bin/env node "use strict"; const moment = require("moment"); const sugar = require("sugar"); const chalk = require("chalk"); const exec = require("child_process").exec; process.argv.splice(0, 2); if (process.argv.length > 0) { // Attempt to parse the date let date = process.argv.join(" "); let parsedDa...
#!/usr/bin/env node "use strict"; const moment = require("moment"); const sugar = require("sugar"); const chalk = require("chalk"); const exec = require("child_process").exec; // Throw a fatal error const fatal = err => { console.error(`fatal: ${err}`); } process.argv.splice(0, 2); if (process.argv.length > 0) { ...
Move fatal throw to separate function
Move fatal throw to separate function
JavaScript
mit
sam3d/git-date
b6f80db17489eb5adea2e6afa1f1318de42f13e5
index.js
index.js
/** * Module dependencies. */ var reduceCSSCalc = require("reduce-css-calc") /** * Expose `plugin`. */ module.exports = plugin /** * Plugin to convert all function calls. * * @param {Object} stylesheet */ function plugin() { return function(style) { style.eachDecl(function declaration(dec) { if ...
/** * Module dependencies. */ var reduceCSSCalc = require("reduce-css-calc") /** * Expose plugin & helper */ module.exports = plugin module.exports.transformDecl = transformDecl /** * PostCSS plugin to reduce calc() function calls. */ function plugin() { return function(style) { style.eachDecl(transformDe...
Update comment & expose transformDecl
Update comment & expose transformDecl That will allow direct usage un a plugin to avoid multiple loop to apply transformation directly in a global plugin
JavaScript
mit
postcss/postcss-calc
cd6156a92c7641fa3b3e7b0cfb2c258e5789bf6c
index.js
index.js
var os = require('os') var path = require('path') var homedir = require('os-homedir') function linux (id) { var cacheHome = process.env.XDG_CACHE_HOME || path.join(homedir(), '.cache') return path.join(cacheHome, id) } function darwin (id) { return path.join(homedir(), 'Library', 'Caches', id) } function win32...
var os = require('os') var path = require('path') var homedir = require('os-homedir') function posix (id) { var cacheHome = process.env.XDG_CACHE_HOME || path.join(homedir(), '.cache') return path.join(cacheHome, id) } function darwin (id) { return path.join(homedir(), 'Library', 'Caches', id) } function win32...
Clean up existing OS handling a little
Clean up existing OS handling a little * Avoid fall-through in switch statement. * Improve error message in the case of incompatibility. * Rename linux() function to posix(). * Sort cases alphabetically for improved readability.
JavaScript
mit
LinusU/node-cachedir
3c7d404115288f70c300e0ad26a7f23298ae25fd
index.js
index.js
var stati = [ 'irritable', 'gassy', 'diuretic', 'constipated', 'twisted', 'cramped' // Have another idea? Submit a pull request or issue // https://github.com/itsananderson/gut-status/issues ]; function getStatus() { var index = Math.floor(Math.random() * stati.length); return s...
var stati = [ 'irritable', 'gassy', 'diuretic', 'constipated', 'twisted', 'cramped', 'surly', 'churlish', 'hungry', 'famished' // Have another idea? Submit a pull request or issue // https://github.com/itsananderson/gut-status/issues ]; function getStatus() { var ind...
Add surly, churlish, hungry, and famished
Add surly, churlish, hungry, and famished
JavaScript
mit
itsananderson/gut-status
5dca57f086d68d9b5846f25c2a07d33a80abfa78
index.js
index.js
'use strict'; var tape = require('tape'); var through = require('through2'); var PluginError = require('gulp-util').PluginError; var requireUncached = require('require-uncached'); var PLUGIN_NAME = 'gulp-tape'; var gulpTape = function(opts) { opts = opts || {}; var outputStream = opts.outputStream || process.st...
'use strict'; var tape = require('tape'); var through = require('through2'); var PluginError = require('gulp-util').PluginError; var requireUncached = require('require-uncached'); var PLUGIN_NAME = 'gulp-tape'; var gulpTape = function(opts) { opts = opts || {}; var outputStream = opts.outputStream || process.st...
Call `cb` immediately if `pending` is zero
Call `cb` immediately if `pending` is zero
JavaScript
mit
yuanqing/gulp-tape
b57b340ac0bcc369156fcfe3295dc5e4a54aad55
index.js
index.js
'use strict'; const appPath = require('app-path'); const bundleId = require('bundle-id'); const osxAppVersion = require('osx-app-version'); const appSize = require('app-size'); module.exports = app => { if (process.platform !== 'darwin') { return Promise.reject(new Error('Only OS X is supported')); } if (typeof ...
'use strict'; const appPath = require('app-path'); const bundleId = require('bundle-id'); const osxAppVersion = require('osx-app-version'); const appSize = require('app-size'); module.exports = app => { if (process.platform !== 'darwin') { return Promise.reject(new Error('Only OS X is supported')); } if (typeof ...
Reorder object to make more sense
Reorder object to make more sense
JavaScript
mit
gillstrom/osx-app
de29f2833d776a6405ab9f9fdf10f558ec916c7d
index.js
index.js
'use strict'; /** * Helper to avoid: * var DatasetEditController = require('../../../app/hello/dataset/edit/DatasetEditController'); * Just use rrequire('DatasetEditController') instead! */ var path = require('path'); var rrequire = function (filename) { var absPath = __dirname; var projectRoot = process.cwd();...
'use strict'; /** * Helper to avoid: * var DatasetEditController = require('../../../app/hello/dataset/edit/DatasetEditController'); * Just use rrequire('DatasetEditController') instead! */ var path = require('path'); var callsite = require('callsite'); var rrequire = function (filename) { var absPath = path.dirn...
Use callsite to get path of caller
Use callsite to get path of caller
JavaScript
mit
baelter/require-helper
4bcce86558e7be9e0baadef5e2686229241d5d6b
index.js
index.js
/*! * days <https://github.com/jonschlinkert/days> * * Copyright (c) 2014 Jon Schlinkert, contributors. * Licensed under the MIT license. */ module.exports = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; module.exports.abbr = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; mod...
/*! * days <https://github.com/jonschlinkert/days> * * Copyright (c) 2014 Jon Schlinkert, contributors. * Licensed under the MIT license. */ // English module.exports.en = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; module.exports.en.abbr = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', '...
Update to include multi-language support
Update to include multi-language support Adding French and updating for English
JavaScript
mit
datetime/days
34c1352671382808810760a9908f4d8b1b3d507d
index.js
index.js
var postcss = require('postcss'), color = require('color'); module.exports = postcss.plugin('postcss-lowvision', function () { return function (css) { css.walkDecls('color', function (decl) { var val = decl.value; var rgb = color(val); rgb.rgb(); decl.va...
var postcss = require('postcss'), color = require('color'); module.exports = postcss.plugin('postcss-lowvision', function () { return function (css) { css.walkDecls('color', function (decl) { var val = decl.value; var rgb = color(val); rgb = rgb.rgbArray(); ...
Add text-shadow with used color rgb value
Add text-shadow with used color rgb value
JavaScript
mit
keukenrolletje/postcss-lowvision
75f75e238be54a709a29ddf4aa69adc693f3ef4a
index.js
index.js
module.exports = function (options) { options = options || {} options.property = options.property || 'body' options.stringify = options.stringify || JSON.stringify return function (req, res, next) { req.removeAllListeners('data') req.removeAllListeners('end') if(req.headers['content-length'] !== u...
module.exports = function (options) { options = options || {} options.property = options.property || 'body' options.stringify = options.stringify || JSON.stringify return function (req, res, next) { req.removeAllListeners('data') req.removeAllListeners('end') if(req.headers['content-length'] !== u...
Set content-length in bytes instead of characters
Set content-length in bytes instead of characters
JavaScript
mit
dominictarr/connect-restreamer
11de7f2f5db1b6107626a490cfd7f841a5f29568
src/__tests__/TimeTable.test.js
src/__tests__/TimeTable.test.js
import React from 'react'; import ReactDOM from 'react-dom'; import { shallow } from 'enzyme'; import TimeTable from './../TimeTable.js'; import ErrorMsg from './../ErrorMsg'; import LoadingMsg from './../LoadingMsg'; describe('TimeTable', () => { it('renders without crashing', () => { const div = document.createEl...
import React from 'react'; import ReactDOM from 'react-dom'; import { shallow } from 'enzyme'; import TimeTable from './../TimeTable.js'; import ErrorMsg from './../ErrorMsg'; import LoadingMsg from './../LoadingMsg'; import DepartureInfo from './../DepartureInfo.js'; jest.mock('../APIQuery'); describe('TimeTable', (...
Test that departure infos are rendered.
Test that departure infos are rendered.
JavaScript
mit
kangasta/timetablescreen,kangasta/timetablescreen
1bd01d06e230b4f3a09f3404ac2ba4460a78fb8b
index.js
index.js
'use strict'; module.exports = function (scope) { var rc = require('rc')('npm'); return rc[scope + ':registry'] || rc.registry || 'https://registry.npmjs.org/'; };
'use strict'; module.exports = function (scope) { var rc = require('rc')('npm', {registry: 'https://registry.npmjs.org/'}); return rc[scope + ':registry'] || rc.registry; };
Make it work in browsers
Make it work in browsers
JavaScript
mit
sindresorhus/registry-url,sindresorhus/registry-url
6adbbb3a8de7bd37fe4508d0c8e16a564dd85413
src/app/FacetsWrapper/index.js
src/app/FacetsWrapper/index.js
import React from 'react' import Range from '../Range' import RefinementList from '../RefinementList' import SidebarSection from '../SidebarSection' import './style.scss' function Facets () { return ( <div data-app='facets-wrapper'> <RefinementList title='category' attributeName='category' /> <Refine...
import React from 'react' import Range from '../Range' import RefinementList from '../RefinementList' import SidebarSection from '../SidebarSection' import './style.scss' function Facets () { return ( <div data-app='facets-wrapper'> <RefinementList title='category' attributeName='category' /> <Refine...
Improve mast and fin size facets
Improve mast and fin size facets
JavaScript
mit
windtoday/windtoday-marketplace,windtoday/windtoday-marketplace,windtoday/windtoday-app