commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4
values | license stringclasses 13
values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
567f26f5b9a5ffa0c28fba789ad502c54c4035a7 | public/js/mathjax-config-extra.js | public/js/mathjax-config-extra.js | var MathJax = {
messageStyle: 'none',
skipStartupTypeset: true,
tex2jax: {
inlineMath: [['$', '$'], ['\\(', '\\)']],
processEscapes: true
}
}
| window.MathJax = {
messageStyle: 'none',
skipStartupTypeset: true,
tex2jax: {
inlineMath: [['$', '$'], ['\\(', '\\)']],
processEscapes: true
}
}
| Fix MathJax config not being picked up | Fix MathJax config not being picked up
thanks standard
| JavaScript | unknown | jackycute/HackMD,hackmdio/hackmd,Yukaii/hackmd,hackmdio/hackmd,hackmdio/hackmd,Yukaii/hackmd,jackycute/HackMD,jackycute/HackMD,Yukaii/hackmd | ---
+++
@@ -1,4 +1,4 @@
-var MathJax = {
+window.MathJax = {
messageStyle: 'none',
skipStartupTypeset: true,
tex2jax: { |
d643b37ec079ab8ac429cb1f256413d2a29c24cc | tasks/gulp/clean-pre.js | tasks/gulp/clean-pre.js | (function(){
'use strict';
var gulp = require('gulp');
var paths = require('./_paths');
var ignore = require('gulp-ignore');
var rimraf = require('gulp-rimraf');
// clean out assets folder
gulp.task('clean-pre', function() {
return gulp
.src([paths.dest, paths.tmp], {read: false})
.pip... | (function(){
'use strict';
var gulp = require('gulp');
var paths = require('./_paths');
var ignore = require('gulp-ignore');
var rimraf = require('gulp-rimraf');
// clean out assets folder
gulp.task('clean-pre', function() {
return gulp
.src([paths.dest, paths.tmp, 'reports/protractor-e2e/scre... | Clean out screenshots on gulp build | Clean out screenshots on gulp build
| JavaScript | mit | ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend | ---
+++
@@ -1,6 +1,6 @@
(function(){
'use strict';
-
+
var gulp = require('gulp');
var paths = require('./_paths');
var ignore = require('gulp-ignore');
@@ -9,7 +9,7 @@
// clean out assets folder
gulp.task('clean-pre', function() {
return gulp
- .src([paths.dest, paths.tmp], {read: fals... |
0f4f943f76e1e7f92126b01671f3fee496ad380c | test/annotationsSpec.js | test/annotationsSpec.js | import annotations from '../src/annotations';
describe('A test', function () {
it('will test something', function () {
expect(annotations).to.be.an('object');
});
});
| import annotations from '../src/annotations/annotations';
describe('A test', function () {
it('will test something', function () {
expect(annotations).to.be.an('object');
});
});
| Correct path in annotations spec | Correct path in annotations spec
| JavaScript | bsd-3-clause | Emigre/openseadragon-annotations | ---
+++
@@ -1,4 +1,4 @@
-import annotations from '../src/annotations';
+import annotations from '../src/annotations/annotations';
describe('A test', function () {
|
573c116d1a9928600b8273987af58ec50d8f804f | server/src/controllers/HistoriesController.js | server/src/controllers/HistoriesController.js | const {
History,
Song
} = require('../models')
const _ = require('lodash')
module.exports = {
async index (req, res) {
try {
const userId = req.user.id
const histories = await History.findAll({
where: {
UserId: userId
},
include: [
{
model: ... | const {
History,
Song
} = require('../models')
const _ = require('lodash')
module.exports = {
async index (req, res) {
try {
const userId = req.user.id
const histories = await History.findAll({
where: {
UserId: userId
},
include: [
{
model: ... | Order by date on server side before finding uniques | Order by date on server side before finding uniques
| JavaScript | mit | codyseibert/tab-tracker,codyseibert/tab-tracker | ---
+++
@@ -16,6 +16,9 @@
{
model: Song
}
+ ],
+ order: [
+ ['createdAt', 'DESC']
]
})
.map(history => history.toJSON()) |
f52802ee28b3434b2608b4b43a30f841ea54cb89 | test.js | test.js | import postcss from 'postcss';
import test from 'ava';
import plugin from './';
function run(t, input, output) {
return postcss([ plugin ]).process(input)
.then( result => {
t.is(result.css, output);
t.is(result.warnings().length, 0);
});
}
test('adds blur to css', t =>... | import postcss from 'postcss';
import test from 'ava';
import plugin from './';
function run(t, input, output) {
return postcss([ plugin ]).process(input)
.then( result => {
t.is(result.css, output);
t.is(result.warnings().length, 0);
});
}
test('adds blur to css', t =>... | Test to see if filter gets blur | Test to see if filter gets blur
| JavaScript | mit | keukenrolletje/postcss-lowvision | ---
+++
@@ -20,3 +20,8 @@
run(t, 'img {}',
'img { filter: blur(5px); }');
});
+
+test('adds blur to filter', t => {
+ run(t, 'a { filter: contrast(1.5) }',
+ 'a { filter: blur(5px) contrast(1.5); }');
+}); |
c7d7289fbace750769cd3694cdfcfebd4ca5d123 | esm/parse-query.js | esm/parse-query.js | export function parseQuery (query) {
const chunks = query.split(/([#.])/);
let tagName = '';
let id = '';
const classNames = [];
for (var i = 0; i < chunks.length; i++) {
const chunk = chunks[i];
if (chunk === '#') {
id = chunks[++i];
} else if (chunk === '.') {
classNames.push(chunks... | export function parseQuery (query) {
const chunks = query.split(/([#.])/);
let tagName = '';
let id = '';
const classNames = [];
for (let i = 0; i < chunks.length; i++) {
const chunk = chunks[i];
if (chunk === '#') {
id = chunks[++i];
} else if (chunk === '.') {
classNames.push(chunks... | Use `let` instead of `var` | Use `let` instead of `var`
Just a very small change | JavaScript | mit | redom/redom | ---
+++
@@ -4,7 +4,7 @@
let id = '';
const classNames = [];
- for (var i = 0; i < chunks.length; i++) {
+ for (let i = 0; i < chunks.length; i++) {
const chunk = chunks[i];
if (chunk === '#') {
id = chunks[++i]; |
bd1ea6fceceacb3f5e71e75c51fb434ddc370208 | app/Exceptions/Handler.js | app/Exceptions/Handler.js | 'use strict'
const MapErrorCodeToView = {
404: 'frontend.404',
};
/**
* This class handles all exceptions thrown during
* the HTTP request lifecycle.
*
* @class ExceptionHandler
*/
class ExceptionHandler {
_getYouchError (error, req, isJSON) {
const Youch = require('youch');
const youch = new Youch(e... | 'use strict'
const MapErrorCodeToView = {
404: 'frontend.404',
};
/**
* This class handles all exceptions thrown during
* the HTTP request lifecycle.
*
* @class ExceptionHandler
*/
class ExceptionHandler {
_getYouchError (error, req, isJSON) {
const Youch = require('youch');
const youch = new Youch(e... | Fix handler. Found the issue. | Fix handler. Found the issue.
| JavaScript | mit | ToxWebsite/tox.chat | ---
+++
@@ -32,14 +32,14 @@
* @return {void}
*/
async handle (error, { request, response, view }) {
- //if (process.env.NODE_ENV === 'development') {
+ if (process.env.NODE_ENV === 'development') {
const isJSON = request.accepts(['html', 'json']) === 'json';
const formattedError = await... |
4d7ac21f6f89c71bdd3bde76a1fe9f0aa4bec5a7 | src/api/create.js | src/api/create.js | import assign from '../util/assign';
import init from './init';
import registry from '../global/registry';
var specialMap = {
caption: 'table',
dd: 'dl',
dt: 'dl',
li: 'ul',
tbody: 'table',
td: 'tr',
thead: 'table',
tr: 'tbody'
};
function matchTag (dom) {
var tag = dom.match(/\s*<([^\s>]+)/);
ret... | import assign from '../util/assign';
import init from './init';
import registry from '../global/registry';
var specialMap = {
caption: 'table',
dd: 'dl',
dt: 'dl',
li: 'ul',
tbody: 'table',
td: 'tr',
thead: 'table',
tr: 'tbody'
};
function fixIeNotAllowingInnerHTMLOnTableElements (tag, html) {
var t... | Fix IE not allowing innerHTML table elements (except for a cell) descendants. | Fix IE not allowing innerHTML table elements (except for a cell) descendants.
| JavaScript | mit | antitoxic/skatejs,skatejs/skatejs,chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs | ---
+++
@@ -13,15 +13,34 @@
tr: 'tbody'
};
+function fixIeNotAllowingInnerHTMLOnTableElements (tag, html) {
+ var target = document.createElement('div');
+ var levels = 0;
+
+ while (tag) {
+ html = `<${tag}>${html}</${tag}>`;
+ tag = specialMap[tag];
+ ++levels;
+ }
+
+ target.innerHTML = html;
+... |
63b3c56cc5c654bdd581f407abf5d6dc475dadac | test/strategyApiSpec.js | test/strategyApiSpec.js | var specHelper = require('./specHelper');
describe('The strategy api', function () {
var request;
before(function () { request = specHelper.setupMockServer(); });
after(specHelper.tearDownMockServer);
it('gets all strategies', function (done) {
request
.get('/strategies')
... | var specHelper = require('./specHelper');
describe('The strategy api', function () {
var request;
before(function () { request = specHelper.setupMockServer(); });
after(specHelper.tearDownMockServer);
it('gets all strategies', function (done) {
request
.get('/strategies')
... | Add test for /strategies/:name 403 if strategy exists. | Add test for /strategies/:name 403 if strategy exists.
| JavaScript | apache-2.0 | Unleash/unleash,Unleash/unleash,Unleash/unleash,finn-no/unleash,Unleash/unleash,finn-no/unleash,finn-no/unleash | ---
+++
@@ -36,5 +36,13 @@
.expect(400, done);
});
+ it('refuses to create a strategy with an existing name', function (done) {
+ request
+ .post('/strategies')
+ .send({name: 'default'})
+ .set('Content-Type', 'application/json')
+ .expect(403... |
64a8e58cc88b79faee2f6ce2c0044775d6f8643c | reaks-material/selectButton.js | reaks-material/selectButton.js | const isFunction = require("lodash/isFunction")
const isString = require("lodash/isString")
const clickable = require("../reaks/clickable")
const hFlex = require("../reaks/hFlex")
const label = require("../reaks/label")
const style = require("../reaks/style")
const icon = require("../reaks-material/icon")
const textInp... | const isFunction = require("lodash/isFunction")
const isString = require("lodash/isString")
const clickable = require("uiks/reaks/clickable")
const label = require("uiks/reaks/label")
const hFlex = require("../reaks/hFlex")
const style = require("../reaks/style")
const icon = require("../reaks-material/icon")
const tex... | Select button accepts custom value displayer | Select button accepts custom value displayer
| JavaScript | mit | KAESapps/uiks,KAESapps/uiks | ---
+++
@@ -1,8 +1,8 @@
const isFunction = require("lodash/isFunction")
const isString = require("lodash/isString")
-const clickable = require("../reaks/clickable")
+const clickable = require("uiks/reaks/clickable")
+const label = require("uiks/reaks/label")
const hFlex = require("../reaks/hFlex")
-const label = r... |
ded16b8fc8f518ce0ac3c484dc00003124356fca | src/camel-case.js | src/camel-case.js | import R from 'ramda';
import capitalize from './capitalize.js';
import uncapitalize from './uncapitalize.js';
import spaceCase from './space-case.js';
// a -> a
const camelCase = R.compose(
uncapitalize,
R.join(''),
R.map(R.compose(capitalize, R.toLower)),
R.split(' '),
spaceCase
);
export default camelCas... | import R from 'ramda';
import uncapitalize from './uncapitalize.js';
import pascalCase from './pascal-case.js';
// a -> a
const camelCase = R.compose(uncapitalize, pascalCase);
export default camelCase;
| Refactor the camelCase function to use the pascalCase function | Refactor the camelCase function to use the pascalCase function
| JavaScript | mit | restrung/restrung-js | ---
+++
@@ -1,15 +1,8 @@
import R from 'ramda';
-import capitalize from './capitalize.js';
import uncapitalize from './uncapitalize.js';
-import spaceCase from './space-case.js';
+import pascalCase from './pascal-case.js';
// a -> a
-const camelCase = R.compose(
- uncapitalize,
- R.join(''),
- R.map(R.compose... |
5a03074df9a1dddb85557209961a43a8687f2290 | tests/unit/lint-test.js | tests/unit/lint-test.js | 'use strict';
const glob = require('glob').sync;
let paths = glob('tests/*');
paths = paths.concat([
'lib',
'blueprints',
]);
require('mocha-eslint')(paths, {
timeout: 10000,
slow: 1000,
});
| 'use strict';
const glob = require('glob').sync;
let paths = glob('tests/*');
paths = paths.concat([
'lib',
'blueprints',
]);
require('mocha-eslint')(paths, {
timeout: 30000,
slow: 1000,
});
| Increase timeout for linting tests | tests: Increase timeout for linting tests
| JavaScript | mit | Turbo87/ember-cli,elwayman02/ember-cli,thoov/ember-cli,asakusuma/ember-cli,jgwhite/ember-cli,cibernox/ember-cli,jgwhite/ember-cli,mike-north/ember-cli,thoov/ember-cli,HeroicEric/ember-cli,cibernox/ember-cli,kategengler/ember-cli,jgwhite/ember-cli,jrjohnson/ember-cli,mike-north/ember-cli,fpauser/ember-cli,cibernox/ember... | ---
+++
@@ -10,6 +10,6 @@
]);
require('mocha-eslint')(paths, {
- timeout: 10000,
+ timeout: 30000,
slow: 1000,
}); |
8e1963be0915d74b745f5dd0dcf7113ea55060f9 | src/gallery.js | src/gallery.js | import mediumZoom from '@/config/medium-zoom';
window.addEventListener('DOMContentLoaded', mediumZoom);
| import mediumZoom from '@/config/medium-zoom';
window.addEventListener('DOMContentLoaded', () => {
const zoomer = mediumZoom();
zoomer.addEventListeners('show', (event) => {
const img = event.currentTarget;
if (!img.hasAttribute('data-hd')) return;
img.setAttribute('data-lowres', img.getAttribute('s... | Load hd images on mediu zoom | Load hd images on mediu zoom
| JavaScript | mit | tuelsch/bolg,tuelsch/bolg | ---
+++
@@ -1,3 +1,22 @@
import mediumZoom from '@/config/medium-zoom';
-window.addEventListener('DOMContentLoaded', mediumZoom);
+window.addEventListener('DOMContentLoaded', () => {
+ const zoomer = mediumZoom();
+
+ zoomer.addEventListeners('show', (event) => {
+ const img = event.currentTarget;
+
+ if (... |
37c5e2d057a03c0424800524981c96c486a362e7 | connectors/v2/vk-dom-inject.js | connectors/v2/vk-dom-inject.js | 'use strict';
// This script runs in non-isolated environment(vk.com itself)
// for accessing to `window.ap` which sends player events
const INFO_ID = 0;
const INFO_TRACK = 3;
const INFO_ARTIST = 4;
window.webScrobblerInjected = window.webScrobblerInjected || false;
(function () {
if (window.webScrobblerInjected) ... | 'use strict';
// This script runs in non-isolated environment(vk.com itself)
// for accessing to `window.ap` which sends player events
const INFO_ID = 0;
const INFO_TRACK = 3;
const INFO_ARTIST = 4;
window.webScrobblerInjected = window.webScrobblerInjected || false;
(function () {
if (window.webScrobblerInjected) ... | Fix transfering info from injected script to VK connector | Fix transfering info from injected script to VK connector
| JavaScript | mit | inverse/web-scrobbler,david-sabata/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,Paszt/web-scrobbler,alexesprit/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,galeksandrp/web-scrobbler,alexesprit/web-scrobbler,usdivad/web-scrobbler,carpet-berlin/web-scrobbler,carpet-berlin/web-scrobbler,david-sabata/web-scrobbler,ga... | ---
+++
@@ -25,9 +25,9 @@
window.postMessage({
sender: 'web-scrobbler',
type,
- currentTime,
- duration,
trackInfo: {
+ currentTime,
+ duration,
uniqueID: audioObject[INFO_ID],
artistTrack: {
artist: audioObject[INFO_ARTIST], |
ef6f1f71017ffe5c751975b9cd8c0a5de483b8c3 | app/sw-precache-config.js | app/sw-precache-config.js | module.exports = {
stripPrefix: 'dist/',
staticFileGlobs: [
'dist/*.html',
'dist/manifest.json',
'dist/*.png',
'dist/**/!(*map*)'
],
dontCacheBustUrlsMatching: /\.\w{8}\./,
swFilePath: 'dist/service-worker.js'
};
| module.exports = {
stripPrefix: 'dist/',
staticFileGlobs: [
'dist/*.html',
'dist/*.php',
'dist/manifest.json',
'dist/*.png',
'dist/**/!(*map*)'
],
dontCacheBustUrlsMatching: /\.\w{8}\./,
swFilePath: 'dist/service-worker.js'
};
| Update software precache for hosting environment | Update software precache for hosting environment
| JavaScript | mit | subramaniashiva/quotes-pwa,subramaniashiva/quotes-pwa | ---
+++
@@ -2,6 +2,7 @@
stripPrefix: 'dist/',
staticFileGlobs: [
'dist/*.html',
+ 'dist/*.php',
'dist/manifest.json',
'dist/*.png',
'dist/**/!(*map*)' |
a1b419354da262498f34083e8afd199e199425e3 | src/edit/index.js | src/edit/index.js | // !! This module implements the ProseMirror editor. It contains
// functionality related to editing, selection, and integration with
// the browser. `ProseMirror` is the class you'll want to instantiate
// and interact with when using the editor.
export {ProseMirror} from "./main"
export {defineOption} from "./option... | // !! This module implements the ProseMirror editor. It contains
// functionality related to editing, selection, and integration with
// the browser. `ProseMirror` is the class you'll want to instantiate
// and interact with when using the editor.
export {ProseMirror} from "./main"
export {defineOption} from "./option... | Remove some non-existing exports from the edit module | Remove some non-existing exports from the edit module
| JavaScript | mit | kiejo/prosemirror,tzuhsiulin/prosemirror,salzhrani/prosemirror,mattberkowitz/prosemirror,tzuhsiulin/prosemirror,adrianheine/prosemirror,salzhrani/prosemirror,jacwright/prosemirror,mattberkowitz/prosemirror,jacwright/prosemirror,tzuhsiulin/prosemirror,kiejo/prosemirror,salzhrani/prosemirror,kiejo/prosemirror,adrianheine... | ---
+++
@@ -7,7 +7,7 @@
export {defineOption} from "./options"
export {Range, SelectionError} from "./selection"
export {MarkedRange} from "./range"
-export {CommandSet, defineDefaultParamHandler, withParamHandler, Command} from "./command"
+export {CommandSet, Command} from "./command"
export {baseCommands} from... |
1f319b223e46cf281e19c3546b17e13e49c1ff10 | src/api/resolve/mutation/auth/confirmEmail.js | src/api/resolve/mutation/auth/confirmEmail.js | import bind from "lib/helper/graphql/normalizeParams"
import BadRequest from "lib/error/http/BadRequest"
import waterfall from "lib/helper/array/runWaterfall"
import db from "lib/db/connection"
import {get, remove} from "lib/auth/tokens"
import User from "model/User"
import Session from "model/Session"
const confirm... | import bind from "lib/helper/graphql/normalizeParams"
import BadRequest from "lib/error/http/BadRequest"
import waterfall from "lib/helper/array/runWaterfall"
import db from "lib/db/connection"
import {get, remove} from "lib/auth/tokens"
import User from "model/User"
import Session from "model/Session"
const confirm... | Reorder operations in email confirmation resolver. | Reorder operations in email confirmation resolver.
| JavaScript | mit | octet-stream/ponyfiction-js,octet-stream/ponyfiction-js | ---
+++
@@ -25,11 +25,11 @@
}
user = await waterfall([
- () => remove(hash),
-
() => Session.destroy({where: {userId: user.id}, transaction}),
() => user.update({status: User.statuses.active}, {transaction}),
+
+ () => remove(hash),
() => user.reload({transaction})
]) |
6a2c1b42097e15074d14f52f9ad12640d047bd04 | src/client/app/layout/pv-top-nav.directive.js | src/client/app/layout/pv-top-nav.directive.js | (function() {
'use strict';
angular
.module('app.layout')
.directive('pvTopNav', pvTopNav);
/* @ngInject */
function pvTopNav () {
var directive = {
bindToController: true,
controller: TopNavController,
controllerAs: 'vm',
restric... | (function() {
'use strict';
angular
.module('app.layout')
.directive('pvTopNav', pvTopNav);
/* @ngInject */
function pvTopNav () {
var directive = {
bindToController: true,
controller: TopNavController,
controllerAs: 'vm',
restric... | Fix returning to index and the navbar not turning transparent | Fix returning to index and the navbar not turning transparent
| JavaScript | apache-2.0 | Poniverse/Poniverse.net | ---
+++
@@ -19,7 +19,7 @@
};
/* @ngInject */
- function TopNavController($scope, $document, $state) {
+ function TopNavController($scope, $document, $state, $rootScope) {
var vm = this;
activate();
@@ -28,6 +28,7 @@
checkWithinIntro();
... |
9ea79410a12f3d3b34a92e96304d22e6ca69ba02 | src/LiveError.js | src/LiveError.js | export default class LiveError extends Error {
constructor(errorObj) {
super();
this.message = `Server Error: (${errorObj.code}) ${errorObj.message}`;
this.stack = (new Error()).stack;
this.name = this.constructor.name;
}
}
| export default class LiveError extends Error {
constructor(errorObj) {
super();
this.message = `Server Error: (${errorObj.code}) ${errorObj.message}, caused by ${errorObj.echo_req}`;
this.stack = (new Error()).stack;
this.name = this.constructor.name;
}
}
| Include request when logging error | Include request when logging error
| JavaScript | mit | nuruddeensalihu/binary-live-api,qingweibinary/binary-live-api,qingweibinary/binary-live-api,nuruddeensalihu/binary-live-api | ---
+++
@@ -1,7 +1,7 @@
export default class LiveError extends Error {
constructor(errorObj) {
super();
- this.message = `Server Error: (${errorObj.code}) ${errorObj.message}`;
+ this.message = `Server Error: (${errorObj.code}) ${errorObj.message}, caused by ${errorObj.echo_req}`;
... |
0fac7d46e3f14735939adf240675ace77ca47e52 | src/components/section/section.js | src/components/section/section.js | import React from 'react';
/**
* A section wrapper.
*
* This is a standalone section wrapper used for layout.
*
* == How to use a Section in a component:
*
* In your file
*
* import Section from 'carbon/lib/components/section';
*
* To render the Section:
*
* <Section />
*
* @class Section
* @constr... | import React from 'react';
let Section = (props) =>
<div className={ `carbon-section ${props.className}` }>
<h2 className='carbon-section__title'>{ props.title }</h2>
{ props.children }
</div>
;
Section.propTypes = {
children: React.PropTypes.node,
title: React.PropTypes.string.isRequired
};
expor... | Refactor Section into functional, stateless component | Refactor Section into functional, stateless component
| JavaScript | apache-2.0 | Sage/carbon,Sage/carbon,Sage/carbon | ---
+++
@@ -1,56 +1,15 @@
import React from 'react';
-/**
- * A section wrapper.
- *
- * This is a standalone section wrapper used for layout.
- *
- * == How to use a Section in a component:
- *
- * In your file
- *
- * import Section from 'carbon/lib/components/section';
- *
- * To render the Section:
- *
- * ... |
1280ee2c404514228a5b9a81bce3fa0d36312142 | src/models/admin.js | src/models/admin.js | import stampit from 'stampit';
import {Meta, Model} from './base';
import {BaseQuerySet, Get, List, First, PageSize, Raw} from '../querySet';
const AdminQuerySet = stampit().compose(
BaseQuerySet,
Get,
List,
First,
PageSize
);
const AdminMeta = Meta({
name: 'admin',
pluralName: 'admins',
endpoints: {
... | import stampit from 'stampit';
import {Meta, Model} from './base';
import {BaseQuerySet, Get, List, First, PageSize} from '../querySet';
const AdminQuerySet = stampit().compose(
BaseQuerySet,
Get,
List,
First,
PageSize
);
const AdminMeta = Meta({
name: 'admin',
pluralName: 'admins',
endpoints: {
'... | Remove Raw import from Admin model | [LIB-464] Remove Raw import from Admin model
| JavaScript | mit | Syncano/syncano-server-js | ---
+++
@@ -1,6 +1,6 @@
import stampit from 'stampit';
import {Meta, Model} from './base';
-import {BaseQuerySet, Get, List, First, PageSize, Raw} from '../querySet';
+import {BaseQuerySet, Get, List, First, PageSize} from '../querySet';
const AdminQuerySet = stampit().compose(
BaseQuerySet, |
7c39e26deb567dbb3edc87a60ba8653f39e778f1 | seeds/users.js | seeds/users.js | var db = require('../models/db');
db.User
.build({
username: 'johndoe',
email: 'johndoe@tessel.io',
name: 'John Doe',
password: 'password',
})
.digest()
.genApiKey()
.save()
.success(function(user){
console.log('user =>' + user.username + ' stored');
})
.error(function(err){
con... | var db = require('../models/db');
db.User
.build({
username: 'johndoe',
email: 'johndoe@tessel.io',
name: 'John Doe',
password: 'password',
passwordConfirmation: 'password'
})
.confirmPassword()
.digest()
.genApiKey()
.save()
.success(function(user){
console.log('user =>' + user.u... | Add password confirmation to user seeds. | Add password confirmation to user seeds.
| JavaScript | apache-2.0 | tessel/oauth,tessel/oauth,tessel/oauth | ---
+++
@@ -6,7 +6,9 @@
email: 'johndoe@tessel.io',
name: 'John Doe',
password: 'password',
+ passwordConfirmation: 'password'
})
+ .confirmPassword()
.digest()
.genApiKey()
.save()
@@ -23,7 +25,9 @@
email: 'janedoe@tessel.io',
name: 'Jane Doe',
password: 'password',
+ ... |
54d0f0af2512c870d9d2ed44f6b9f69f9ea4fac8 | src/features/todos/components/TodosWebview.js | src/features/todos/components/TodosWebview.js | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { observer } from 'mobx-react';
import injectSheet from 'react-jss';
import Webview from 'react-electron-web-view';
import * as environment from '../../../environment';
const styles = theme => ({
root: {
background: theme.colorB... | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { observer } from 'mobx-react';
import injectSheet from 'react-jss';
import Webview from 'react-electron-web-view';
import * as environment from '../../../environment';
const styles = theme => ({
root: {
background: theme.colorB... | Fix position of todos app | Fix position of todos app
| JavaScript | apache-2.0 | meetfranz/franz,meetfranz/franz,meetfranz/franz | ---
+++
@@ -12,7 +12,7 @@
width: 300,
position: 'absolute',
top: 0,
- right: 0,
+ right: -300,
},
webview: {
height: '100%', |
a6f2d30ae7ec856468540a6b628bf038f1f9d0f0 | src/observer.js | src/observer.js | import EventEmitter from 'events';
export default class Observer extends EventEmitter {
constructor() {
super();
this._name = null;
this._model = null;
this._value = null;
this._format = (v) => v;
this._handleSet = (e) => this._set(e);
}
destroy() {
this._unbindModel();
}
name... | import EventEmitter from 'events';
export default class Observer extends EventEmitter {
constructor() {
super();
this._name = null;
this._model = null;
this._value = null;
this._format = (v) => v;
this._handleSet = (e) => this._set(e);
}
destroy() {
this._unbindModel();
}
name... | Call _set in next loop | Call _set in next loop
| JavaScript | mit | scola84/node-d3-model | ---
+++
@@ -33,10 +33,12 @@
this._model = value;
this._bindModel();
- this._set({
- changed: false,
- name: this._name,
- value: value.get(this._name)
+ setTimeout(() => {
+ this._set({
+ changed: false,
+ name: this._name,
+ value: value.get(this._name)
+ ... |
79de75ce7997c05397202203c274a990bcb68c82 | src/scripts/main.js | src/scripts/main.js | (function($) {
// SVG polyfill
svg4everybody();
// Deep anchor links for headings
anchors.options = {
placement: 'left',
visible: 'touch',
icon: '#'
}
anchors.add('.post h3, .post h4, .post h5, post h6, .page h3, .page h4, .page h5, page h6, .archive-overview h3, .archiv... | (function($) {
// SVG polyfill
svg4everybody();
// Deep anchor links for headings
anchors.options = {
placement: 'left',
visible: 'touch',
icon: '#'
};
anchors.add('.post h3, .post h4, .post h5, post h6, .page h3, .page h4, .page h5, page h6, .archive-overview h3, .arch... | Fix AnchorJS messing up due to missing semicolon | Fix AnchorJS messing up due to missing semicolon
Closes #13
| JavaScript | mit | yellowled/blog-theme,yellowled/blog-theme | ---
+++
@@ -7,7 +7,8 @@
placement: 'left',
visible: 'touch',
icon: '#'
- }
+ };
+
anchors.add('.post h3, .post h4, .post h5, post h6, .page h3, .page h4, .page h5, page h6, .archive-overview h3, .archive-overview h4');
anchors.remove('.comment header > h4');
|
4f8db08c1385d59f05a5b4e720d9705e666fc4b4 | js/app/renderer.js | js/app/renderer.js | define( ["three", "container"], function ( THREE, container ) {
container.innerHTML = "";
var renderer = new THREE.WebGLRenderer( { clearColor: 0x000000 } );
renderer.sortObjects = false;
renderer.autoClear = false;
container.appendChild( renderer.domElement );
var updateSize = function () {
renderer.s... | define( ["three", "container"], function ( THREE, container ) {
container.innerHTML = "";
var renderer = new THREE.WebGLRenderer( { clearColor: 0x000000 } );
renderer.sortObjects = false;
renderer.autoClear = false;
container.appendChild( renderer.domElement );
var updateSize = function () {
renderer.s... | Switch to pixel ratio of 2 | Switch to pixel ratio of 2 | JavaScript | mit | felixpalmer/lod-terrain,felixpalmer/lod-terrain,felixpalmer/lod-terrain | ---
+++
@@ -7,6 +7,9 @@
var updateSize = function () {
renderer.setSize( container.offsetWidth, container.offsetHeight );
+
+ // For a smoother render double the pixel ratio
+ renderer.setPixelRatio( 2 );
};
window.addEventListener( 'resize', updateSize, false );
updateSize(); |
1032910c151deac9606d5fa9c638bbaa736c2fba | js/inputmanager.js | js/inputmanager.js | function InputManager() {
this.km;
this.notify;
this.newGame;
this.quitGame;
this.pauseGame;
}
InputManager.prototype.setKeyMap = function(keyMap) {
this.km = keyMap;
}
InputManager.prototype.register = function(event, callback) {
switch(event) {
case 'action': this.noti... | function InputManager() {
this.km;
this.notify;
this.newGame;
this.quitGame;
this.pauseGame;
}
/* Store the game-related keycodes to listen for */
InputManager.prototype.setKeyMap = function(keyMap) {
this.km = keyMap;
}
/* Defines the comm pipeline to take when a relavent event is captu... | Add comments to every method. | Add comments to every method.
| JavaScript | mit | 16point7/tetris,16point7/tetris | ---
+++
@@ -8,10 +8,12 @@
}
+/* Store the game-related keycodes to listen for */
InputManager.prototype.setKeyMap = function(keyMap) {
this.km = keyMap;
}
+/* Defines the comm pipeline to take when a relavent event is captured */
InputManager.prototype.register = function(event, callback) {
sw... |
167889789d1301c60f2bf499bde54ccd8248ee08 | src/settings.js | src/settings.js | (function (window) {
"use strict";
var setts = {
"SERVER_URL": "http://localhost:8061/",
"CREDZ": {
"client_id": "5O1KlpwBb96ANWe27ZQOpbWSF4DZDm4sOytwdzGv",
"client_secret": "PqV0dHbkjXAtJYhY9UOCgRVi5BzLhiDxGU91" +
"kbt5EoayQ5SYOoJBYRYAYlJl2R... | (function (window) {
"use strict";
var setts = {
"SERVER_URL": "http://localhost:8061/",
"CREDZ": {
"client_id": "5O1KlpwBb96ANWe27ZQOpbWSF4DZDm4sOytwdzGv",
"client_secret": "PqV0dHbkjXAtJYhY9UOCgRVi5BzLhiDxGU91" +
"kbt5EoayQ5SYOoJBYRYAYlJl2R... | Rename reset_url to revoke url | Rename reset_url to revoke url
| JavaScript | mit | MasterFacilityList/mfl_admin_web,torgartor21/mfl_admin_web,torgartor21/mfl_admin_web,MasterFacilityList/mfl_admin_web,torgartor21/mfl_admin_web,MasterFacilityList/mfl_admin_web,MasterFacilityList/mfl_admin_web,torgartor21/mfl_admin_web | ---
+++
@@ -10,12 +10,12 @@
"e9DaQr0HKHan0B9ptVyoLvOqpekiOmEqUJ6H" +
"ZKuIoma0pvqkkKDU9GPv",
"token_url": "o/token/",
- "reset_url": "o/reset_token"
+ "revoke_url": "o/revoke_token"
}
};
setts.CREDZ.tok... |
132bc723a9466c822ed8a3dd40230a7c1b94c818 | test/models.js | test/models.js | var chai = require('chai');
var should = chai.should();
var User = require('../models/User');
describe('User Model', function() {
it('should create a new user', function(done) {
var user = new User({
email: 'test@gmail.com',
password: 'password'
});
user.save(function(err) {
if (err) re... | var chai = require('chai');
var should = chai.should();
var User = require('../models/User');
describe('User Model', function() {
it('should create a new user', function(done) {
var user = new User({
email: 'test@gmail.com',
password: 'password'
});
user.save(function(err) {
if (err) re... | Update model.js for syntax error | Update model.js for syntax error
It was bothering me.. | JavaScript | mit | LucienBrule/carpool,stepheljobs/tentacool,quazar11/portfolio,ch4tml/fcc-voting-app,nehiljain/rhime,baby03201/hackathon-starter,quazar11/portfolio,dafyddPrys/contingency,ReadingPlus/flog,MikeMichel/hackathon-starter,teogenesmoura/SoftwareEng12016,caofb/hackathon-starter,awarn/bitcoins-trader,nehiljain/rhime,Torone/toro-... | ---
+++
@@ -11,7 +11,7 @@
user.save(function(err) {
if (err) return done(err);
done();
- })
+ });
});
it('should not create a user with the unique email', function(done) { |
f37990bed2aee7fd62bfb6eff7673c4ea147877b | examples/scribuntoRemoteDebug.js | examples/scribuntoRemoteDebug.js | var Bot = require( 'nodemw' ),
readline = require( 'readline' ),
fs = require( 'fs' ),
c = require( 'ansicolors' ),
rl = readline.createInterface( {
input: process.stdin,
output: process.stdout
} ),
client = new Bot( {
protocol: 'https',
server: 'dev.fandom.com',
path: ''
} ),
params = {
action: 'sc... | var Bot = require( 'nodemw' ),
readline = require( 'readline' ),
fs = require( 'fs' ),
c = require( 'ansicolors' ),
rl = readline.createInterface( {
input: process.stdin,
output: process.stdout
} ),
client = new Bot( {
protocol: 'https',
server: 'dev.fandom.com',
path: ''
} ),
params = {
action: 'sc... | Set encoding to UTF-8 in fs.readFile call | Set encoding to UTF-8 in fs.readFile call
https://youtu.be/AXwGVXD7qEQ | JavaScript | bsd-2-clause | macbre/nodemw | ---
+++
@@ -40,4 +40,4 @@
rl.on( 'line', cli );
}
-fs.readFile( 'helloworld.lua', session );
+fs.readFile( 'helloworld.lua', 'utf8', session ); |
c3d5fe4d0d30faf3bfcb221a953fe614ed122d6f | webpack/config.babel.js | webpack/config.babel.js | import webpack from 'webpack';
import loaders from './loaders';
export default {
name: 'nordnet-component-kit',
entry: {
'nordnet-component-kit': './src/index.js',
},
output: {
library: 'NordnetComponentKit',
libraryTarget: 'umd',
path: './lib',
filename: '[name].js',
},
resolve: {
... | import webpack from 'webpack';
import loaders from './loaders';
export default {
name: 'nordnet-component-kit',
entry: {
'nordnet-component-kit': './src/index.js',
},
output: {
library: 'NordnetComponentKit',
libraryTarget: 'umd',
path: './lib',
filename: '[name].js',
},
resolve: {
... | Add new peerDeps to externals to reduce bundle-size | Add new peerDeps to externals to reduce bundle-size
| JavaScript | mit | nordnet/nordnet-component-kit | ---
+++
@@ -22,30 +22,12 @@
module: {
loaders,
},
- externals: [
- {
- react: {
- root: 'React',
- commonjs2: 'react',
- commonjs: 'react',
- amd: 'react',
- },
- }, {
- 'react-dom': {
- root: 'ReactDOM',
- commonjs2: 'react-dom',
- com... |
17decc6731c8f75d551bb975c10ad2291664d53d | js/bookmarkHTML.js | js/bookmarkHTML.js | function collectionToBookmarkHtml(collection) {
var html = addHeader();
html += "<DL><p>";
html += transformCollection(collection);
html += "</DL><p>";
return html;
}
function collectionsToBookmarkHtml(collections) {
var html = addHeader();
html += "<DL><p>";
$.each(collections, fun... | function collectionToBookmarkHtml(collection) {
var html = addHeader();
html += "<DL><p>";
html += transformCollection(collection);
html += "</DL><p>";
return html;
}
function collectionsToBookmarkHtml(collections) {
var html = addHeader();
html += "<DL><p>";
$.each(collections, fun... | Fix export collections with sub-collections | Fix export collections with sub-collections
| JavaScript | mit | sboulema/Linky,sboulema/Linky | ---
+++
@@ -39,7 +39,7 @@
});
$.each(collection.nodes, function (index, node) {
- transformCollection(html, node);
+ html += transformCollection(node);
});
html += "</DL><p>"; |
9e0fa25b2dfc12c6862f2fcb81811e6cfa5e2807 | app/js/arethusa.core/conf_url.factory.js | app/js/arethusa.core/conf_url.factory.js | "use strict";
// Handles params concerning configuration files in the $routeProvider phase
angular.module('arethusa.core').factory('confUrl', function($route) {
return function() {
var params = $route.current.params;
var confPath = './static/configs/';
// Fall back to default and wrong paths to conf fil... | "use strict";
// Handles params concerning configuration files in the $routeProvider phase
angular.module('arethusa.core').factory('confUrl', function($route) {
return function(useDefault) {
var params = $route.current.params;
var confPath = './static/configs/';
// Fall back to default and wrong paths t... | Add param to confUrl to define fallback to default | Add param to confUrl to define fallback to default
| JavaScript | mit | fbaumgardt/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,Masoumeh/arethusa | ---
+++
@@ -2,7 +2,7 @@
// Handles params concerning configuration files in the $routeProvider phase
angular.module('arethusa.core').factory('confUrl', function($route) {
- return function() {
+ return function(useDefault) {
var params = $route.current.params;
var confPath = './static/configs/';
@@ ... |
b9315cb1f0d875987156812f361b48ac1ebc77cf | lib/string/text.js | lib/string/text.js | var Node = require("./node");
var he = require("he");
function Text (value) {
this.nodeValue = value;
}
Node.extend(Text, {
/**
*/
nodeType: 3,
/**
*/
getInnerHTML: function () {
return this.nodeValue ? he.encode(String(this.nodeValue)) : this.nodeValue;
},
/**
*/
cloneNode: funct... | var Node = require("./node");
var he = require("he");
function Text (value) {
this.nodeValue = value;
this._encode = !!encode;
}
Node.extend(Text, {
/**
*/
nodeType: 3,
/**
*/
getInnerHTML: function () {
return ( this._nodeValue && this._encode ) ? he.encode( String( this._nodeValue ) ) : t... | Fix for paperclip's unsafe block | Fix for paperclip's unsafe block
Ok finally seems to be working...
{{content}} encodes and <unsafe html={{content}} /> doesn't now. | JavaScript | mit | crcn/nofactor.js,crcn-archive/nofactor.js | ---
+++
@@ -3,6 +3,7 @@
function Text (value) {
this.nodeValue = value;
+ this._encode = !!encode;
}
Node.extend(Text, {
@@ -16,7 +17,7 @@
*/
getInnerHTML: function () {
- return this.nodeValue ? he.encode(String(this.nodeValue)) : this.nodeValue;
+ return ( this._nodeValue && this._encode ) ... |
b23b12c53a29c432a36a2052900ecfadd09d6af5 | src/options.js | src/options.js | 'use strict'
/**
* app options
* @type {Object}
*/
var options = {
components: [
{ name: 'Typography' },
{ name: 'Components', type: 'separator' },
{ name: 'Button' },
{ name: 'Card' },
{ name: 'Checkbox' },
{ name: 'Dialog' },
{ name: 'Switch' },
{ name: 'Field' },
{ name: 'S... | 'use strict'
/**
* app options
* @type {Object}
*/
var options = {
components: [
{ name: 'Typography' },
{ name: 'Components', type: 'divider' },
{ name: 'Button' },
{ name: 'Card' },
{ name: 'Checkbox' },
{ name: 'Dialog' },
{ name: 'Switch' },
{ name: 'Field' },
{ name: 'Sli... | Use divider instead of separator | Use divider instead of separator
| JavaScript | mit | codepolitan/material-demo,codepolitan/material-demo | ---
+++
@@ -8,7 +8,7 @@
var options = {
components: [
{ name: 'Typography' },
- { name: 'Components', type: 'separator' },
+ { name: 'Components', type: 'divider' },
{ name: 'Button' },
{ name: 'Card' },
{ name: 'Checkbox' },
@@ -17,11 +17,11 @@
{ name: 'Field' },
{ name: 'Slid... |
bb541c161b66e6deabcf515f6557b730354bee95 | app/assets/javascripts/comfortable_mexican_sofa/admin/application.js | app/assets/javascripts/comfortable_mexican_sofa/admin/application.js | // Overwrite this file in your application /app/assets/javascripts/comfortable_mexican_sofa/admin/application.js
//= require requirejs/require
//= require require_config
window.CMS.wysiwyg = function() {
require([
'mas-editor'
], function (
masEditor
) {
var markdownEditorContentNode = document.query... | // Overwrite this file in your application /app/assets/javascripts/comfortable_mexican_sofa/admin/application.js
//= require requirejs/require
//= require require_config
window.CMS.wysiwyg = function() {
require([
'mas-editor'
], function (
masEditor
) {
var markdownEditorContentNode = document.query... | Use strict mode on app | Use strict mode on app
| JavaScript | mit | moneyadviceservice/cms,moneyadviceservice/cms,moneyadviceservice/cms,moneyadviceservice/cms | ---
+++
@@ -11,6 +11,7 @@
var markdownEditorContentNode = document.querySelector('.js-markdown-editor-content'),
classActive = 'is-active',
htmlEditorNode;
+ 'use strict';
if(!markdownEditorContentNode) return;
|
e6f5961bac1c19a80469d7753b14a0d76b66e7f2 | package.js | package.js | const packager = require('electron-packager');
const path = require('path');
const os = require('os');
packagerOptions = {
"dir": ".",
"out": path.resolve("dist", "windows"),
"platform": "win32",
"arch": "ia32",
"overwrite": true,
"asar": {
"unpackDir": "dfu"
},
"ignore": ["msi", "setup", ".idea"]
};
packa... | const packager = require('electron-packager');
const path = require('path');
const os = require('os');
packagerOptions = {
"dir": ".",
"out": path.resolve("dist", "windows"),
"icon": path.resolve("build", "windows.ico"),
"platform": "win32",
"arch": "ia32",
"overwrite": true,
"asar": {
"unpackDir": "dfu"
},
... | Package windows version with icon | Package windows version with icon
| JavaScript | mit | NoahAndrews/qmk_firmware_flasher,NoahAndrews/qmk_firmware_flasher,NoahAndrews/qmk_firmware_flasher | ---
+++
@@ -5,6 +5,7 @@
packagerOptions = {
"dir": ".",
"out": path.resolve("dist", "windows"),
+ "icon": path.resolve("build", "windows.ico"),
"platform": "win32",
"arch": "ia32",
"overwrite": true, |
9f7f95b2436210969a436cb3ed82b3380a044c46 | server/controllers/login.js | server/controllers/login.js | import passport from './auth';
module.exports = {
login(req, res, next) {
passport.authenticate('local', (err, user) => {
if (err) { return next(err); }
if (!user) { return res.status(400).send(user); }
req.logIn(user, (err) => {
if (err) { return next(err); }
return res.status(... | import passport from './auth';
module.exports = {
login(req, res, next) {
passport.authenticate('local', (err, user) => {
if (err) { return next(err); }
if (!user) { return res.status(404).send(user); }
req.logIn(user, (err) => {
if (err) { return next(err); }
return res.status(... | Edit status code for invalid sign in username | Edit status code for invalid sign in username
| JavaScript | mit | 3m3kalionel/PostIt,3m3kalionel/PostIt | ---
+++
@@ -4,7 +4,7 @@
login(req, res, next) {
passport.authenticate('local', (err, user) => {
if (err) { return next(err); }
- if (!user) { return res.status(400).send(user); }
+ if (!user) { return res.status(404).send(user); }
req.logIn(user, (err) => {
if (err) { return n... |
a301b4c3c1b36ec7d95ed85e9d3207bd118198ab | test/helpers/setup-browser-env.js | test/helpers/setup-browser-env.js | import { env, createVirtualConsole } from 'jsdom';
import path from 'path';
import Storage from 'dom-storage';
const virtualConsole = createVirtualConsole().sendTo(console);
const dirname = path.dirname(module.filename);
export default (content = "") => {
return new Promise((resolve, reject) => {
env({
... | import { JSDOM } from 'jsdom';
import path from 'path';
import Storage from 'dom-storage';
const dirname = path.dirname(module.filename);
export default (content = "") => {
return new Promise((resolve) => {
const env = new JSDOM(`<head>
<meta name="defaultLanguage" content="en">
<me... | Update tests for new jsdom | Update tests for new jsdom
| JavaScript | mpl-2.0 | freaktechnik/mines.js,freaktechnik/mines.js | ---
+++
@@ -1,49 +1,35 @@
-import { env, createVirtualConsole } from 'jsdom';
+import { JSDOM } from 'jsdom';
import path from 'path';
import Storage from 'dom-storage';
-const virtualConsole = createVirtualConsole().sendTo(console);
const dirname = path.dirname(module.filename);
export default (content = "") =... |
f1c5d4a42aa433d21447bc08f0eeddd1c535b082 | weightchart.js | weightchart.js | $(document).ready(function() {
//$.get('http://127.0.0.1:8000/output.csv', function (data) {
//$.get('https://github.com/kenyot/weight_log/blob/gh-pages/output.csv', function (data) {
$.get('output.csv', function (data) {
Highcharts.setOptions({
global: {
useUTC: true
... | $(document).ready(function() {
//$.get('http://127.0.0.1:8000/output.csv', function (data) {
$.get('output.csv', function (data) {
Highcharts.setOptions({
global: {
useUTC: true
},
colors: ['#2222ff', '#ff2222']
});
$('#container').high... | Fix cross domain request (CORS) issue | Fix cross domain request (CORS) issue
| JavaScript | mit | kenyot/weight_log,kenyot/weight_log,kenyot/weight_log | ---
+++
@@ -1,6 +1,5 @@
$(document).ready(function() {
//$.get('http://127.0.0.1:8000/output.csv', function (data) {
- //$.get('https://github.com/kenyot/weight_log/blob/gh-pages/output.csv', function (data) {
$.get('output.csv', function (data) {
Highcharts.setOptions({
global: { |
fa34e5ce4afc9398cb60b8d4ba10c90ee2e6539b | webpack.config.js | webpack.config.js | var webpack = require('webpack')
var generate = function(isProd) {
return {
entry: {
'sir-trevor-adapter': './src/index.js',
},
output: {
library: 'SirTrevorAdapter',
libraryTarget: 'umd',
filename: '[name].' + (isProd ? 'min.' : '') + 'js'
... | var webpack = require('webpack')
var generate = function(isProd) {
return {
entry: {
'sir-trevor-adapter': './src/index.js',
},
output: {
library: 'SirTrevorAdapter',
libraryTarget: 'umd',
filename: '[name].' + (isProd ? 'min.' : '') + 'js'
... | Fix (again) how this module is included via amd/commonjs | Fix (again) how this module is included via amd/commonjs
| JavaScript | mit | Upplication/sir-trevor-adapter | ---
+++
@@ -11,7 +11,11 @@
},
plugins: isProd ? [ new webpack.optimize.UglifyJsPlugin() ] : [],
externals: {
- "jquery": "jQuery"
+ jquery: {
+ commonjs: 'jquery',
+ amd: 'jquery',
+ root: 'jQuery'
+ }
}
... |
9a5f3b08e446bcbad12d064d7dca192413397fa9 | template/base/src/configureStore.js | template/base/src/configureStore.js | import { createStore, applyMiddleware, compose } from 'redux'
import rootReducer from 'reducers/rootReducer'
import { throttle } from 'lodash'
import createSagaMiddleware from 'redux-saga'
import thunk from 'redux-thunk'
import { getLocalStorage, setLocalStorage } from 'utils/localStorage'
const sagaMiddleware = creat... | import { createStore, applyMiddleware, compose } from 'redux'
import rootReducer from 'reducers/rootReducer'
import { throttle } from 'lodash'
import createSagaMiddleware from 'redux-saga'
import thunk from 'redux-thunk'
import { getLocalStorage, setLocalStorage } from 'utils/storage'
const sagaMiddleware = createSaga... | Fix path for storage util | fix(template): Fix path for storage util
| JavaScript | isc | sean-clayton/neato-react-starterkit,sean-clayton/neato-react-starterkit | ---
+++
@@ -3,7 +3,7 @@
import { throttle } from 'lodash'
import createSagaMiddleware from 'redux-saga'
import thunk from 'redux-thunk'
-import { getLocalStorage, setLocalStorage } from 'utils/localStorage'
+import { getLocalStorage, setLocalStorage } from 'utils/storage'
const sagaMiddleware = createSagaMiddle... |
c5a3da5f6ea2e9e3992ea675e87477a2a36ddec8 | source/PGridWidget/index.js | source/PGridWidget/index.js | export default from './Widget'
export PivotTable from './components/Main'
| export default from './Widget'
export PivotTable from './components/Main'
export Configuration from './components/UpperButtons'
export Grid from './components/Grid'
export Store from './stores/Store'
| Modify external API to expose Configuration, Grid and Store | Modify external API to expose Configuration, Grid and Store
| JavaScript | mit | polluxparis/zebulon-grid,polluxparis/zebulon-grid | ---
+++
@@ -1,3 +1,6 @@
export default from './Widget'
export PivotTable from './components/Main'
+export Configuration from './components/UpperButtons'
+export Grid from './components/Grid'
+export Store from './stores/Store' |
ac474653a7b9ddea6c302a7f6e7bdf67c86e5c6a | app/assets/javascripts/router.js | app/assets/javascripts/router.js | // For more information see: http://emberjs.com/guides/routing/
Sis.Router.map(function() {
this.route('home', { path: '/' });
this.route('teacher', { path: '/teacher' });
this.route('course', { path: '/course/:course_id'});
this.route('semester', { path: '/semester/:semester_id'});
this.route('project', { pa... | // For more information see: http://emberjs.com/guides/routing/
Sis.Router.map(function() {
this.route('home', { path: '/' });
this.route('semester', { path: '/semester/:semester_id'});
this.route('project', { path: '/projects/:project_id'});
this.route('userLogin', { path: '/users/login' });
this.route('r... | Remove unused teacher and course route | Remove unused teacher and course route
| JavaScript | mit | Gowiem/Sisyphus,Gowiem/Sisyphus | ---
+++
@@ -1,8 +1,6 @@
// For more information see: http://emberjs.com/guides/routing/
Sis.Router.map(function() {
this.route('home', { path: '/' });
- this.route('teacher', { path: '/teacher' });
- this.route('course', { path: '/course/:course_id'});
this.route('semester', { path: '/semester/:semester_id'... |
3252148c80bb3fb4b7a2d95af45c12cfd9bcf80c | app/initializers/route-styles.js | app/initializers/route-styles.js | import Router from '@ember/routing/router';
import { getOwner } from '@ember/application';
import podNames from 'ember-component-css/pod-names';
Router.reopen({
didTransition(routes) {
const classes = [];
for (let route of routes) {
let currentPath = route.name.replace(/\./g, '/');
if (podNames[... | import Router from '@ember/routing/router';
import { getOwner } from '@ember/application';
import podNames from 'ember-component-css/pod-names';
Router.reopen({
didTransition(routes) {
const classes = [];
for (let i = 0; i < routes.length; i++) {
let route = routes[i];
let currentPath = route.nam... | Use IE safe `for` loop in route styles initializer | Use IE safe `for` loop in route styles initializer
| JavaScript | mit | ebryn/ember-component-css,ebryn/ember-component-css,webark/ember-component-css,webark/ember-component-css | ---
+++
@@ -5,7 +5,8 @@
Router.reopen({
didTransition(routes) {
const classes = [];
- for (let route of routes) {
+ for (let i = 0; i < routes.length; i++) {
+ let route = routes[i];
let currentPath = route.name.replace(/\./g, '/');
if (podNames[currentPath]) { |
8601acf7791754c361d32ef94e19a8af3bfdb43c | WebContent/js/moe-list.js | WebContent/js/moe-list.js | /* Cached Variables *******************************************************************************/
var context = sessionStorage.getItem('context');
var rowThumbnails = document.querySelector('.row-thumbnails');
/* Initialization *********************************************************************************/
rowTh... | /* Cached Variables *******************************************************************************/
var context = sessionStorage.getItem('context');
var rowThumbnails = document.querySelector('.row-thumbnails');
/* Initialization *********************************************************************************/
rowTh... | Fix overflowing page title when resizing the page | Fix overflowing page title when resizing the page
In the moe-list page, after the height of the thumbnails have been calculated and evened out, when resizing the page, the page title overfloed with the page count at time.
Closes #89 | JavaScript | mit | NYPD/moe-sounds,NYPD/moe-sounds | ---
+++
@@ -27,5 +27,5 @@
});
thumbnails.forEach(function(value, key, listObj, argument) {
- listObj[key].setAttribute('style','height:' + tallestThumbnailSize + 'px');
+ listObj[key].setAttribute('style','min-height:' + tallestThumbnailSize + 'px');
}); |
29463977b521b85684ea7aa8b1b887f813ae772d | tasks/clean.js | tasks/clean.js | /*
* grunt-contrib-clean
* http://gruntjs.com/
*
* Copyright (c) 2012 Tim Branyen, contributors
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
grunt.registerMultiTask('clean', 'Clean files and folders.', function() {
// Merge task-specific and/or target-specific opt... | /*
* grunt-contrib-clean
* http://gruntjs.com/
*
* Copyright (c) 2012 Tim Branyen, contributors
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
grunt.registerMultiTask('clean', 'Clean files and folders.', function() {
// Merge task-specific and/or target-specific opt... | Check if file exists to avoid trying to delete a non-existent file. Fixes GH-23. | Check if file exists to avoid trying to delete a non-existent file. Fixes GH-23.
| JavaScript | mit | gruntjs/grunt-contrib-clean,nqdy666/grunt-contrib-clean,adjohnson916/grunt-contrib-clean,boostermedia/grunt-clean-alt,Drooids/grunt-contrib-clean,lkiarest/grunt-contrib-clean | ---
+++
@@ -20,6 +20,7 @@
// Clean specified files / dirs.
this.filesSrc.forEach(function(filepath) {
+ if (!grunt.file.exists(filepath)) { return; }
grunt.log.write('Cleaning "' + filepath + '"...');
try { |
a9715d1fdaac86d62d52d9adf6515b3373e432ab | app/templates/testacular.conf.js | app/templates/testacular.conf.js | // Testacular configuration
// base path, that will be used to resolve files and exclude
basePath = '';
// list of files / patterns to load in the browser
files = [
JASMINE,
JASMINE_ADAPTER,
'app/components/AngularJS/angular.js',
'test/vendor/angular-mocks.js',
'app/scripts/*.js',
'app/scripts/**/*.js',
... | // Testacular configuration
// base path, that will be used to resolve files and exclude
basePath = '';
// list of files / patterns to load in the browser
files = [
JASMINE,
JASMINE_ADAPTER,
'app/components/angular/angular.js',
'test/vendor/angular-mocks.js',
'app/scripts/*.js',
'app/scripts/**/*.js',
'... | Fix path name for angular component | Fix path name for angular component
| JavaScript | bsd-2-clause | yeoman/generator-karma | ---
+++
@@ -7,7 +7,7 @@
files = [
JASMINE,
JASMINE_ADAPTER,
- 'app/components/AngularJS/angular.js',
+ 'app/components/angular/angular.js',
'test/vendor/angular-mocks.js',
'app/scripts/*.js',
'app/scripts/**/*.js', |
a10e1dd7311d5fa20839b0be59f4fee1e9ef82c6 | test/build.tests.js | test/build.tests.js | const expect = require('chai').expect;
const childProcess = require('child_process');
const path = require('path');
const package = require('../package.json');
describe('The module build', () => {
it('creates an importable module', function(done) {
this.timeout(60000);
const rootDir = path.resolve(__di... | const expect = require('chai').expect;
const childProcess = require('child_process');
const path = require('path');
const package = require('../package.json');
describe('The module build', function () {
it('creates an importable module', function(done) {
this.timeout(60000);
const rootDir = path.resolv... | Convert test back to ES5 | Convert test back to ES5
| JavaScript | mit | narendrashetty/react-geosuggest,ubilabs/react-geosuggest,narendrashetty/react-geosuggest,ubilabs/react-geosuggest,ubilabs/react-geosuggest | ---
+++
@@ -4,14 +4,14 @@
const path = require('path');
const package = require('../package.json');
-describe('The module build', () => {
+describe('The module build', function () {
it('creates an importable module', function(done) {
this.timeout(60000);
const rootDir = path.resolve(__dirname, ... |
f89b1b0c5508eb9ab649ca73acf4432024ff5880 | test/test-simple.js | test/test-simple.js | // Verify that we can spawn a worker, send and receive a simple message, and
// kill it.
var assert = require('assert');
var path = require('path');
var sys = require('sys');
var Worker = require('webworker').Worker;
var w = new Worker(path.join(__dirname, 'workers', 'simple.js'));
w.onmessage = function(e) {
as... | // Verify that we can spawn a worker, send and receive a simple message, and
// kill it.
var assert = require('assert');
var path = require('path');
var sys = require('sys');
var Worker = require('webworker').Worker;
var receivedMsg = false;
var w = new Worker(path.join(__dirname, 'workers', 'simple.js'));
w.onmess... | Add exit validation of message receipt. | Add exit validation of message receipt.
| JavaScript | bsd-3-clause | isaacs/node-webworker,pgriess/node-webworker,kriskowal/node-webworker,iizukanao/node-webworker | ---
+++
@@ -6,6 +6,8 @@
var sys = require('sys');
var Worker = require('webworker').Worker;
+var receivedMsg = false;
+
var w = new Worker(path.join(__dirname, 'workers', 'simple.js'));
w.onmessage = function(e) {
@@ -13,7 +15,13 @@
assert.equal(e.data.bar, 'foo');
assert.equal(e.data.bunkle, 'baz')... |
f4f3900fa786d67e3fadbe1d6417b9a5187cccaa | test/utils/index.js | test/utils/index.js | const buildHeaders = require('./build-headers')
module.exports = {
buildUserHeaders,
buildHeaders
}
function buildUserHeaders (opts) {
const _buildHeaders = buildHeaders(opts)
return function (user) {
return _buildHeaders({
user: {
id: user.id,
name: user.name
}
})
}
}
| const buildHeaders = require('./build-headers')
module.exports = {
buildUserHeaders,
buildHeaders
}
function buildUserHeaders (opts) {
const _buildHeaders = buildHeaders(opts)
return function (user) {
return _buildHeaders({
user: {
id: user.id
}
})
}
}
| Remove name from test utils session | Remove name from test utils session
| JavaScript | apache-2.0 | cesarandreu/bshed,cesarandreu/bshed | ---
+++
@@ -10,8 +10,7 @@
return function (user) {
return _buildHeaders({
user: {
- id: user.id,
- name: user.name
+ id: user.id
}
})
} |
3367593fa41c9e3bb83b0ecca416be6a53695c85 | tests/index-test.js | tests/index-test.js | import expect from 'expect'
import React from 'react'
import {render, unmountComponentAtNode} from 'react-dom'
import Component from 'src/'
describe('Component', () => {
let node
beforeEach(() => {
node = document.createElement('div')
})
afterEach(() => {
unmountComponentAtNode(node)
})
it('dis... | import expect from 'expect'
import React from 'react'
import {render, unmountComponentAtNode} from 'react-dom'
import Component from 'src/'
describe('Component', () => {
let node
beforeEach(() => {
node = document.createElement('div')
})
afterEach(() => {
unmountComponentAtNode(node)
})
it('dis... | Make tests pass. Still need actual unit tests. | Make tests pass. Still need actual unit tests.
| JavaScript | mit | FlyBase/react-ontology-ribbon,FlyBase/react-ontology-ribbon | ---
+++
@@ -15,9 +15,9 @@
unmountComponentAtNode(node)
})
- it('displays a welcome message', () => {
+ it('displays no ribbon data found', () => {
render(<Component/>, node, () => {
- expect(node.innerHTML).toContain('Welcome to React components')
+ expect(node.innerHTML).toContain('No ribb... |
d58af3c3240b4b22f74a5a68561f488dd7dd12b5 | app/scripts/app.config.js | app/scripts/app.config.js | angular.module('app.config', []);
angular.module('app.config').factory('apiUrl', function($location) {
// API Config
var protocol = 'https' //$location.protocol();
var host = 'aaa-drivinglaws-api.herokuapp.com' // $location.host();
var port = 443; // $location.port();
var fullApiUrl = function() {
return... | angular.module('app.config', []);
angular.module('app.config').factory('apiUrl', function($location) {
// API Config
var protocol = process.env.API_PROTOCOL || $location.protocol();
var host = process.env.API_HOST || $location.host();
var port = process.env.API_PORT || $location.port();
var fullApiUrl = func... | Replace hardcoded api values with env variables | Replace hardcoded api values with env variables
| JavaScript | mit | hamehta3/driving-laws-diff,hamehta3/driving-laws-diff | ---
+++
@@ -2,9 +2,9 @@
angular.module('app.config').factory('apiUrl', function($location) {
// API Config
- var protocol = 'https' //$location.protocol();
- var host = 'aaa-drivinglaws-api.herokuapp.com' // $location.host();
- var port = 443; // $location.port();
+ var protocol = process.env.API_PROTOCOL |... |
04c718fd2d65a1da6cd757de842dc7e60017ba9a | app/scripts/app/router.js | app/scripts/app/router.js | define([
'ember',
],
function (Em) {
'use strict';
var Router = Em.Router.extend({
location: 'history'
});
Router.map(function () {
this.resource('groups', {path: '/groups'}, function () {
this.resource('group', {path: ':group_id'}, function () {
this.route('edit');
});
th... | define([
'ember',
],
function (Em) {
'use strict';
var Router = Em.Router.extend({
location: 'history'
});
Router.map(function () {
this.resource('groups', {path: '/groups'}, function () {
// these inner resources 'group' and 'items' are split up
// so that their inner views are exclusi... | Clean up Ember routes a bit and clarify their declarations | Clean up Ember routes a bit and clarify their declarations
| JavaScript | mit | darvelo/wishlist,darvelo/wishlist | ---
+++
@@ -11,11 +11,16 @@
Router.map(function () {
this.resource('groups', {path: '/groups'}, function () {
+ // these inner resources 'group' and 'items' are split up
+ // so that their inner views are exclusively shown on screen.
+ // also for clarity.
+
this.resource('group', {pat... |
ce765ee4328263e8fbac717859e7ce9c73b70321 | src/common/getDifficulty.js | src/common/getDifficulty.js | import DIFFICULTIES from 'common/DIFFICULTIES';
export default function getDifficulty(fight) {
return DIFFICULTIES[fight.difficulty];
}
| import DIFFICULTIES from './DIFFICULTIES';
export default function getDifficulty(fight) {
return DIFFICULTIES[fight.difficulty];
}
| Use relative import within common folder | Use relative import within common folder
| JavaScript | agpl-3.0 | FaideWW/WoWAnalyzer,enragednuke/WoWAnalyzer,yajinni/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,FaideWW/WoWAnalyzer,sMteX/WoWAnalyzer,ronaldpereira/WoWAnalyzer,enragednuke/WoWAnalyzer,anom0ly/WoWAnalyzer,anom0ly/WoWAnalyzer,Juko8/WoWAnalyzer,hasseboulen/WoWAnalyzer,hasseboulen/WoWAnalyzer,fyruna/WoWAnalyzer,yajinni/WoWAnalyzer... | ---
+++
@@ -1,4 +1,4 @@
-import DIFFICULTIES from 'common/DIFFICULTIES';
+import DIFFICULTIES from './DIFFICULTIES';
export default function getDifficulty(fight) {
return DIFFICULTIES[fight.difficulty]; |
b9b97e3129403c542eca9e010a39c43cf81898f6 | src/common/utils/routing.js | src/common/utils/routing.js | import 'ui-router-extras';
import futureRoutes from 'app/routes.json!';
var routing = function(module) {
module.requires.push('ct.ui.router.extras.future');
var RouterConfig = ['$stateProvider', '$futureStateProvider', function ($stateProvider, $futureStateProvider) {
$futureStateProvider.stateFactory('load... | import 'ui-router-extras';
import futureRoutes from 'app/routes.json!';
var routing = function(module) {
module.requires.push('ct.ui.router.extras.future');
var RouterConfig = ['$stateProvider', '$futureStateProvider', function ($stateProvider, $futureStateProvider) {
$futureStateProvider.stateFactory('load... | FIX : ignore __esModule key | FIX : ignore __esModule key
| JavaScript | mit | Sedona-Solutions/sdn-angularjs-seed,Sedona-Solutions/sdn-angularjs-seed | ---
+++
@@ -14,7 +14,7 @@
var newModule = loaded;
if (!loaded.name) {
var key = Object.keys(loaded);
- newModule = loaded[key[0]];
+ newModule = loaded[key[1]];
}
$ocLazyLoad.load(newModule).then(function() { |
6a30ecd13fcdcff24dbf61da6cd71447ed4abf4d | src/components/InputArea.js | src/components/InputArea.js | import React, { Component } from 'react';
import TextField from 'material-ui/TextField';
import Card, { CardActions, CardContent } from 'material-ui/Card';
import Button from 'material-ui/Button';
import TaxCalculator from '../libs/TaxCalculator';
class TextFields extends Component {
state = {
income: 0,
ex... | import React, { Component } from 'react';
import TextField from 'material-ui/TextField';
import Card, { CardActions, CardContent } from 'material-ui/Card';
import Button from 'material-ui/Button';
import TaxCalculator from '../libs/TaxCalculator';
class TextFields extends Component {
state = {
income: 0,
ex... | CHange number step on input area. | CHange number step on input area.
| JavaScript | apache-2.0 | migutw42/jp-tax-calculator,migutw42/jp-tax-calculator | ---
+++
@@ -27,6 +27,7 @@
type="number"
value={this.state.income}
onChange={event => this.setState({ income: event.target.value })}
+ inputProps={{ step: '10000' }}
margin="normal"
style={{ width: '100%' }}
/>
@@ -38,... |
be6216337ea2dca1625584afa2bbac9a00e0a6d5 | tests/banks.js | tests/banks.js | import { expect } from 'chai';
import NBG from '../src/banks/NBG';
import CreditAgricole from '../src/banks/CreditAgricole';
import CBE from '../src/banks/CBE';
const { describe, it } = global;
const banks = [
NBG,
CreditAgricole,
CBE,
];
describe('Banks', () => {
banks.forEach((Bank) => {
const bank = ... | import { expect } from 'chai';
import NBG from '../src/banks/NBG';
import CreditAgricole from '../src/banks/CreditAgricole';
import CBE from '../src/banks/CBE';
const { describe, it } = global;
const banks = [
NBG,
CreditAgricole,
CBE,
];
describe('Banks', () => {
banks.forEach((Bank) => {
const bank = ... | Check if results from bank are not equal null | Check if results from bank are not equal null
| JavaScript | mit | MMayla/egypt-banks-scraper | ---
+++
@@ -16,14 +16,14 @@
banks.forEach((Bank) => {
const bank = new Bank();
describe(bank.name.acronym, () => {
+ const bankTestPromise = new Promise((resolve) => {
+ bank.scrape((rates) => {
+ resolve(rates);
+ });
+ });
+
it('Should not equal null', () => {
- ... |
85ba499463cb350fb5ecbdfef82b84d8b8d1b5be | scripts/postinstall.js | scripts/postinstall.js | const shell = require('shelljs');
const path = require('path');
const { rebuild } = require('electron-rebuild');
function rebuildModules(buildPath) {
if (process.platform === 'darwin') {
return rebuild({
buildPath,
// eslint-disable-next-line
electronVersion: require('electron/package.json').ve... | const shell = require('shelljs');
const path = require('path');
const { rebuild } = require('electron-rebuild');
function rebuildModules(buildPath) {
if (process.platform === 'darwin') {
return rebuild({
buildPath,
// eslint-disable-next-line
electronVersion: require('electron/package.json').ve... | Remove more unnecessary files in dist/node_modules/ | Remove more unnecessary files in dist/node_modules/
| JavaScript | mit | jhen0409/react-native-debugger,jhen0409/react-native-debugger,jhen0409/react-native-debugger | ---
+++
@@ -27,6 +27,11 @@
'-rf',
'node_modules/*/{example,examples,test,tests,*.md,*.markdown,CHANGELOG*,.*,Makefile}'
);
+ // Remove unnecessary files in apollo-client-devtools
+ shell.rm(
+ '-rf',
+ 'node_modules/apollo-client-devtools/{assets,build,development,shells/dev,src}'
+ );
// esl... |
30a57deea75ab189ed65e9df0368e1166b20af39 | tests/tests.js | tests/tests.js | // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
exports.defineManualTests = function(rootEl, addButton) {
addButton('Query state', function() {
var detectionIntervalInSeconds = 10;
var que... | // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
exports.defineManualTests = function(rootEl, addButton) {
addButton('Query state', function() {
var detectionIntervalInSeconds = 10;
var que... | Fix references specific to ChromeSpec - Use console.log instead of `logger` from ChromeSpec app | Fix references specific to ChromeSpec
- Use console.log instead of `logger` from ChromeSpec app
| JavaScript | bsd-3-clause | MobileChromeApps/cordova-plugin-chrome-apps-idle,MobileChromeApps/cordova-plugin-chrome-apps-idle | ---
+++
@@ -6,7 +6,7 @@
addButton('Query state', function() {
var detectionIntervalInSeconds = 10;
var queryStateCallback = function(state) {
- logger('State: ' + state);
+ console.log('State: ' + state);
};
chrome.idle.queryState(detectionIntervalInSeconds, queryStateCallback);
})... |
e0f1d78d1edf427cef1c46ab3ec0ba0ad0aaedeb | packages/bootstrap-call-button/bootstrap-call-button.js | packages/bootstrap-call-button/bootstrap-call-button.js | Template.callButton.events({
'click .call-button': function (event, template) {
$(event.target)
.data('working-text', 'Working...')
.button('working')
.prop('disabled', true);
if(template.data.buttonMethodArgs.match(/\(\)$/)) {
args = [eval(template.data.buttonMethodArgs)];
} else ... | Template.callButton.events({
'click .call-button': function (event, template) {
$(event.target)
.data('working-text', 'Working...')
.button('working')
.prop('disabled', true);
if (typeof template.data.buttonMethodArgs === 'string' || template.data.buttonMethodArgs instanceof String) {
... | Fix issue with confirm group order | Fix issue with confirm group order
| JavaScript | agpl-3.0 | pierreozoux/TioApp,pierreozoux/TioApp,pierreozoux/TioApp | ---
+++
@@ -4,8 +4,12 @@
.data('working-text', 'Working...')
.button('working')
.prop('disabled', true);
- if(template.data.buttonMethodArgs.match(/\(\)$/)) {
- args = [eval(template.data.buttonMethodArgs)];
+ if (typeof template.data.buttonMethodArgs === 'string' || template.data.butt... |
5a314a8a1b61d0633745912f31d06572a70c447e | src/containers/permissionssummary/components/RolePermissionsTable.js | src/containers/permissionssummary/components/RolePermissionsTable.js | import React, { PropTypes } from 'react';
import Immutable from 'immutable';
import { Table } from 'react-bootstrap';
import { AUTHENTICATED_USER } from '../../../utils/Consts/UserRoleConsts';
import styles from '../styles.module.css';
export default class RolePermissionsTable extends React.Component {
static propTy... | import React, { PropTypes } from 'react';
import Immutable from 'immutable';
import { Table } from 'react-bootstrap';
import { AUTHENTICATED_USER } from '../../../utils/Consts/UserRoleConsts';
import styles from '../styles.module.css';
export default class RolePermissionsTable extends React.Component {
static propTy... | Add OpenLattice User Role role as clarification for default permissions | Add OpenLattice User Role role as clarification for default permissions
| JavaScript | apache-2.0 | dataloom/gallery,kryptnostic/gallery,kryptnostic/gallery,dataloom/gallery | ---
+++
@@ -19,7 +19,7 @@
let roleStr = role;
if (role === AUTHENTICATED_USER) {
- roleStr = 'Default for all users*';
+ roleStr = 'OpenLattice User Role - Default for all users*';
permissionsStr = 'None';
}
|
fadf8a1556be8e4b2a7f004a808e45f84bbb03b3 | indexing/transformations/latitude-longitude.js | indexing/transformations/latitude-longitude.js | 'use strict';
module.exports = metadata => {
var coordinates;
if (metadata.google_maps_coordinates) {
coordinates = metadata.google_maps_coordinates;
metadata.location_is_approximate = false;
} else if (metadata.google_maps_coordinates_crowd) {
coordinates = metadata.google_maps_coordinates_crowd;
... | 'use strict';
module.exports = metadata => {
var coordinates;
if (metadata.google_maps_coordinates) {
coordinates = metadata.google_maps_coordinates;
metadata.location_is_approximate = false;
} else if (metadata.google_maps_coordinates_crowd) {
coordinates = metadata.google_maps_coordinates_crowd;
... | Index location into a geopoint | Index location into a geopoint
The geopoint is a geolocation type which amongst other things supports geohashing.
KB-351
| JavaScript | mit | CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder | ---
+++
@@ -22,5 +22,13 @@
throw new Error('Encountered unexpected coordinate format.');
}
}
+ // Index into
+ if (metadata.latitude && metadata.longitude) {
+ metadata.location = {
+ "lat": metadata.latitude,
+ "lon": metadata.longitude
+ }
+ }
+
return metadata;
}; |
4810c72e9fea2bd410fd8d54fe0f6e65ecc00673 | npm/postinstall.js | npm/postinstall.js | /* eslint-disable no-var */
var stat = require("fs").stat
var spawn = require("child_process").spawn
var join = require("path").join
var pkg = require("../package.json")
console.log(pkg.name, "post-install", process.cwd())
stat("lib", function(error, stats1) {
if (!error && stats1.isDirectory()) {
return true
... | const stat = require("fs").stat
const spawn = require("child_process").spawn
const join = require("path").join
const pkg = require("../package.json")
console.log(pkg.name, "post-install", process.cwd())
stat("lib", function(error, stats1) {
if (!error && stats1.isDirectory()) {
return true
}
console.warn(
... | Install from git: try to install babel + presets automatically | Install from git: try to install babel + presets automatically
| JavaScript | mit | phenomic/phenomic,MoOx/statinamic,MoOx/phenomic,pelhage/phenomic,phenomic/phenomic,phenomic/phenomic,MoOx/phenomic,MoOx/phenomic | ---
+++
@@ -1,9 +1,7 @@
-/* eslint-disable no-var */
-
-var stat = require("fs").stat
-var spawn = require("child_process").spawn
-var join = require("path").join
-var pkg = require("../package.json")
+const stat = require("fs").stat
+const spawn = require("child_process").spawn
+const join = require("path").join
+co... |
7dbc8051e5eec12db4d98fe658167c522c6d8275 | Libraries/JavaScriptAppEngine/Initialization/symbolicateStackTrace.js | Libraries/JavaScriptAppEngine/Initialization/symbolicateStackTrace.js | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... | Fix symbolication outside of chrome debugging | Fix symbolication outside of chrome debugging
Summary:
When debugging in VScode or nucleide using a nodejs environment rather than chrome, the JS sources are made to appear as if they exist on disk, rather than coming from a `http://` url. Prior to this change the packager would see these file paths and not know how t... | JavaScript | bsd-3-clause | aljs/react-native,ankitsinghania94/react-native,myntra/react-native,jadbox/react-native,ptmt/react-native-macos,frantic/react-native,cpunion/react-native,brentvatne/react-native,kesha-antonov/react-native,orenklein/react-native,adamjmcgrath/react-native,eduardinni/react-native,orenklein/react-native,CodeLinkIO/react-na... | ---
+++
@@ -13,6 +13,7 @@
const {fetch} = require('fetch');
const getDevServer = require('getDevServer');
+const {SourceCode} = require('NativeModules');
import type {StackFrame} from 'parseErrorStack';
@@ -21,6 +22,19 @@
if (!devServer.bundleLoadedFromServer) {
throw new Error('Bundle was not loaded... |
5ae7ddf583c8a2691b19af6fba99ac27ce8f78a4 | lib/ui/util/baconmodelmixin.js | lib/ui/util/baconmodelmixin.js | var BaconModelMixin = {
componentDidMount: function() {
this.unsubscribe = this.props.model.onValue(this.setState.bind(this));
},
componentWillUnmount: function() {
if(this.unsubscribe) {
this.unsubscribe();
}
}
} | module.exports = {
componentDidMount: function() {
this.unsubscribe = this.props.model.log().onValue(this.setState.bind(this));
},
componentWillUnmount: function() {
if(this.unsubscribe) {
this.unsubscribe();
}
}
}
| Fix module export and actually use this.. | Fix module export and actually use this..
| JavaScript | apache-2.0 | SignalK/instrumentpanel,SignalK/instrumentpanel | ---
+++
@@ -1,6 +1,6 @@
-var BaconModelMixin = {
+module.exports = {
componentDidMount: function() {
- this.unsubscribe = this.props.model.onValue(this.setState.bind(this));
+ this.unsubscribe = this.props.model.log().onValue(this.setState.bind(this));
},
componentWillUnmount: function() {
if(this... |
2dd025d7d53fbbe541352f3faafebd16c6aed8da | website/app/application/core/projects/project/home/home.js | website/app/application/core/projects/project/home/home.js | (function (module) {
module.controller('ProjectHomeController', ProjectHomeController);
ProjectHomeController.$inject = ["project", "modalInstance", "processTemplates", "$state"];
function ProjectHomeController(project, modalInstance, processTemplates, $state) {
var ctrl = this;
ctrl.proje... | (function (module) {
module.controller('ProjectHomeController', ProjectHomeController);
ProjectHomeController.$inject = ["project", "modalInstance", "templates", "$state"];
function ProjectHomeController(project, modalInstance, templates, $state) {
var ctrl = this;
ctrl.project = project;
... | Simplify the dependencies and wait on the chooseTemplate service (modal) to return the process to create. | Simplify the dependencies and wait on the chooseTemplate service (modal) to return the process to create.
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | ---
+++
@@ -1,8 +1,8 @@
(function (module) {
module.controller('ProjectHomeController', ProjectHomeController);
- ProjectHomeController.$inject = ["project", "modalInstance", "processTemplates", "$state"];
+ ProjectHomeController.$inject = ["project", "modalInstance", "templates", "$state"];
- functi... |
60a6aa0392366dbf460777044b7f122939df498c | hawk/routes/yard/index.js | hawk/routes/yard/index.js | 'use strict';
var express = require('express');
var router = express.Router();
/**
* Home page
*/
router.get('/', function (req, res, next) {
res.render('yard/index');
});
/**
* Docs page
*/
router.get('/docs', function (req, res, next) {
res.render('yard/docs/index', {
meta : {
title : 'Plat... | 'use strict';
var express = require('express');
var router = express.Router();
/**
* Home page
*/
router.get('/', function (req, res, next) {
res.render('yard/index');
});
/**
* Docs page
*/
router.get('/docs', function (req, res, next) {
res.render('yard/docs/index', {
meta : {
title : 'Plat... | Update description on docs page | Update description on docs page
| JavaScript | mit | codex-team/hawk,codex-team/hawk,codex-team/hawk | ---
+++
@@ -23,7 +23,7 @@
meta : {
title : 'Platform documentation',
- description : 'Docs page helps you start using Hawk. Get token and connent your project right now.'
+ description : 'Complete documentation on how to start using Hawk on your project.'
}
|
8b3e2c636fbdf357b66ceef2191ab9abdd19b8df | core/client/utils/word-count.js | core/client/utils/word-count.js | export default function (s) {
s = s.replace(/(^\s*)|(\s*$)/gi, ''); // exclude start and end white-space
s = s.replace(/[ ]{2,}/gi, ' '); // 2 or more space to 1
s = s.replace(/\n /, '\n'); // exclude newline with a start spacing
return s.split(' ').length;
} | export default function (s) {
s = s.replace(/(^\s*)|(\s*$)/gi, ''); // exclude start and end white-space
s = s.replace(/[ ]{2,}/gi, ' '); // 2 or more space to 1
s = s.replace(/\n /gi, '\n'); // exclude newline with a start spacing
s = s.replace(/\n+/gi, '\n');
return s.split(/ |\n/).length;
} | Fix word count in ember. | Fix word count in ember.
| JavaScript | mit | katrotz/blog.katrotz.space,delgermurun/Ghost,wemakeweb/Ghost,Rovak/Ghost,jgladch/taskworksource,smedrano/Ghost,etdev/blog,jomahoney/Ghost,acburdine/Ghost,dggr/Ghost-sr,daihuaye/Ghost,ghostchina/Ghost-zh,thehogfather/Ghost,flpms/ghost-ad,velimir0xff/Ghost,hilerchyn/Ghost,allanjsx/Ghost,ErisDS/Ghost,wallmarkets/Ghost,fra... | ---
+++
@@ -1,6 +1,7 @@
export default function (s) {
s = s.replace(/(^\s*)|(\s*$)/gi, ''); // exclude start and end white-space
s = s.replace(/[ ]{2,}/gi, ' '); // 2 or more space to 1
- s = s.replace(/\n /, '\n'); // exclude newline with a start spacing
- return s.split(' ').length;
+ s = s.rep... |
4daa3112eafe3982c175ddd16ff4c3e1cb182c53 | app/assets/scripts/components/workshop-fold.js | app/assets/scripts/components/workshop-fold.js | 'use strict';
import React from 'react';
var WorkshopFold = React.createClass({
displayName: 'WorkshopFold',
render: function () {
return (
<section className='workshop-fold'>
<div className='inner'>
<header className='workshop-fold__header'>
<h1 className='workshop-fold__t... | 'use strict';
import React from 'react';
import { Link } from 'react-router';
var WorkshopFold = React.createClass({
displayName: 'WorkshopFold',
render: function () {
return (
<section className='workshop-fold'>
<div className='inner'>
<header className='workshop-fold__header'>
... | Add placeholder link to workshop fold | Add placeholder link to workshop fold
| JavaScript | bsd-3-clause | openaq/openaq.org,openaq/openaq.github.io,openaq/openaq.github.io,openaq/openaq.org,openaq/openaq.org,openaq/openaq.github.io | ---
+++
@@ -1,5 +1,6 @@
'use strict';
import React from 'react';
+import { Link } from 'react-router';
var WorkshopFold = React.createClass({
displayName: 'WorkshopFold',
@@ -12,7 +13,7 @@
<h1 className='workshop-fold__title'>Hold a Workshop</h1>
<div className='prose prose--responsi... |
22d2f2563a74edbdf53684d38a512add3e0ee21f | data/base-data/base-data.js | data/base-data/base-data.js | const ModelState = require('../model-state');
class BaseData {
constructor(db, ModelClass, validator) {
this.db = db;
this.validator = validator;
this.collectionName = ModelClass.name.toLowerCase() + 's';
this.collection = db.collection(this.collectionName);
}
getAll(filter... | const ModelState = require('../model-state');
class BaseData {
constructor(db, ModelClass, validator) {
this.db = db;
this.validator = validator;
this.collectionName = ModelClass.name.toLowerCase() + 's';
this.collection = db.collection(this.collectionName);
}
getAll(filter... | Create return the created object from mongodb | Create return the created object from mongodb
| JavaScript | mit | viktoria-flowers/ViktoriaFlowers,viktoria-flowers/ViktoriaFlowers | ---
+++
@@ -23,9 +23,10 @@
}
return this.collection.insert(model)
- .then(() => {
- // TODO: refactor, parameters?, should return the whole model?
- return model;
+ .then((status) => {
+ // conatins the created Id
+ ... |
38cda2ac47ffe661c6d2bf86f15628d1ebf08faf | scripts/rooms/8.js | scripts/rooms/8.js | var CommandUtil = require('../../src/command_util')
.CommandUtil;
var l10n_file = __dirname + '/../../l10n/scripts/rooms/8.js.yml';
var l10n = require('../../src/l10n')(l10n_file);
exports.listeners = {
//TODO: Use cleverness stat for spot checks such as this.
examine: l10n => {
return (args, player, player... | var CommandUtil = require('../../src/command_util')
.CommandUtil;
var l10n_file = __dirname + '/../../l10n/scripts/rooms/8.js.yml';
var l10n = require('../../src/l10n')(l10n_file);
exports.listeners = {
//TODO: Use cleverness stat for spot checks such as this.
examine: l10n => {
return (args, player, player... | Revise the way that searching for food is handled. | Revise the way that searching for food is handled.
| JavaScript | mit | shawncplus/ranviermud,seanohue/ranviermud,seanohue/ranviermud | ---
+++
@@ -15,11 +15,8 @@
'food'
];
- if (poi.indexOf(args.toLowerCase()) > -1) {
+ if (poi.indexOf(args.toLowerCase()) > -1 && getRand() > 3) {
findFood(player, players);
- if (!player.explore('found food')) {
- player.emit('experience', 100);
- }
}... |
c89b15ac54e376ea1beb3d5b84598d25040e7382 | lib/views/bottom-panel.js | lib/views/bottom-panel.js | 'use strict'
let Message = require('./message')
class BottomPanel extends HTMLElement{
prepare(){
this.panel = atom.workspace.addBottomPanel({item: this, visible: true})
return this
}
destroy(){
this.panel.destroy()
}
set panelVisibility(value){
if(value) this.panel.show()
else this.pane... | 'use strict'
let Message = require('./message')
class BottomPanel extends HTMLElement{
prepare(){
this.panel = atom.workspace.addBottomPanel({item: this, visible: true})
return this
}
destroy(){
this.panel.destroy()
}
set panelVisibility(value){
if(value) this.panel.show()
else this.pane... | Use `@clear` instead of clearing manually | :art: Use `@clear` instead of clearing manually
| JavaScript | mit | Arcanemagus/linter,kaeluka/linter,mdgriffith/linter,JohnMurga/linter,atom-community/linter,AtomLinter/Linter,steelbrain/linter,DanPurdy/linter,UltCombo/linter,levity/linter,blakeembrey/linter,iam4x/linter,elkeis/linter,shawninder/linter,AsaAyers/linter,e-jigsaw/Linter | ---
+++
@@ -22,9 +22,7 @@
}
}
updateMessages(messages, isProject){
- while(this.firstChild){
- this.removeChild(this.firstChild)
- }
+ this.clear()
if(!messages.length){
return this.visibility = false
} |
71474d4668bde652110223678027166ef6addcc8 | src/client/react/user/views/Challenges/ChallengeList.js | src/client/react/user/views/Challenges/ChallengeList.js | import React from 'react';
import PropTypes from 'prop-types';
import { Spinner } from '@blueprintjs/core';
import ChallengeCard from './ChallengeCard';
class ChallengeList extends React.Component {
static propTypes = {
challenges: PropTypes.array
}
render() {
const { challenges } = this.props;
if (challen... | import React from 'react';
import PropTypes from 'prop-types';
import { Spinner, NonIdealState } from '@blueprintjs/core';
import ChallengeCard from './ChallengeCard';
class ChallengeList extends React.Component {
static propTypes = {
challenges: PropTypes.array
}
render() {
const { challenges } = this.props;... | Use non ideal state component to show no challenges | [FIX] Use non ideal state component to show no challenges
| JavaScript | mit | bwyap/ptc-amazing-g-race,bwyap/ptc-amazing-g-race | ---
+++
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
-import { Spinner } from '@blueprintjs/core';
+import { Spinner, NonIdealState } from '@blueprintjs/core';
import ChallengeCard from './ChallengeCard';
@@ -25,8 +25,8 @@
}
else {
return (
- <div style={{text... |
032cae05c0053a6abb8ead70fcac5f97371468ec | migrations/2_deploy_contracts.js | migrations/2_deploy_contracts.js | module.exports = function(deployer) {
deployer.deploy(PullPaymentBid);
deployer.deploy(BadArrayUse);
deployer.deploy(ProofOfExistence);
deployer.deploy(Ownable);
deployer.deploy(Claimable);
deployer.deploy(LimitFunds);
if(deployer.network == 'test'){
deployer.deploy(SecureTargetBounty);
deployer.d... | module.exports = function(deployer) {
deployer.deploy(PullPaymentBid);
deployer.deploy(BadArrayUse);
deployer.deploy(ProofOfExistence);
deployer.deploy(Ownable);
deployer.deploy(Claimable);
deployer.deploy(LimitBalance);
if(deployer.network == 'test'){
deployer.deploy(SecureTargetBounty);
deployer... | Change to right contract name for LimitBalance | Change to right contract name for LimitBalance
| JavaScript | mit | OpenZeppelin/openzeppelin-contracts,OpenZeppelin/zep-solidity,OpenZeppelin/zep-solidity,OpenZeppelin/openzeppelin-contracts,maraoz/zeppelin-solidity,OpenZeppelin/zeppelin-solidity,pash7ka/zeppelin-solidity,dmx374/zeppelin-solidity,OpenZeppelin/openzeppelin-contracts,maraoz/zeppelin-solidity,pash7ka/zeppelin-solidity,Ar... | ---
+++
@@ -4,7 +4,7 @@
deployer.deploy(ProofOfExistence);
deployer.deploy(Ownable);
deployer.deploy(Claimable);
- deployer.deploy(LimitFunds);
+ deployer.deploy(LimitBalance);
if(deployer.network == 'test'){
deployer.deploy(SecureTargetBounty);
deployer.deploy(InsecureTargetBounty); |
96796f76f6de4345e4f3afc2d608bec4f1c2754b | app/js/arethusa.core/routes/conf_editor.constant.js | app/js/arethusa.core/routes/conf_editor.constant.js | "use strict";
angular.module('arethusa.core').constant('CONF_ROUTE', {
controller: 'ConfEditorCtrl',
templateUrl: 'templates/conf_editor.html'
});
| "use strict";
angular.module('arethusa.core').constant('CONF_ROUTE', {
controller: 'ConfEditorCtrl',
templateUrl: 'templates/conf_editor.html',
resolve: {
load: function($http, confUrl, configurator) {
var url = confUrl();
if (url) {
return $http.get(url).then(function(res) {
co... | Update of conf editor route | Update of conf editor route
| JavaScript | mit | alpheios-project/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa | ---
+++
@@ -2,5 +2,15 @@
angular.module('arethusa.core').constant('CONF_ROUTE', {
controller: 'ConfEditorCtrl',
- templateUrl: 'templates/conf_editor.html'
+ templateUrl: 'templates/conf_editor.html',
+ resolve: {
+ load: function($http, confUrl, configurator) {
+ var url = confUrl();
+ if (url)... |
a721a447d1abe397c7b9208bd03e8e97f6561c3e | httpClient/getEvents.js | httpClient/getEvents.js | var debug = require('debug')('geteventstore:getevents'),
req = require('request-promise'),
assert = require('assert'),
url = require('url'),
q = require('q');
var baseErr = 'Get Events - ';
module.exports = function(config) {
var buildUrl = function(stream, startPosition, length, direction) {
... | var debug = require('debug')('geteventstore:getevents'),
req = require('request-promise'),
assert = require('assert'),
url = require('url'),
q = require('q');
var baseErr = 'Get Events - ';
module.exports = function(config) {
var buildUrl = function(stream, startPosition, length, direction) {
... | Fix embed=body to query string for eventstore in mono | Fix embed=body to query string for eventstore in mono
| JavaScript | mit | RemoteMetering/geteventstore-promise,RemoteMetering/geteventstore-promise | ---
+++
@@ -9,7 +9,7 @@
module.exports = function(config) {
var buildUrl = function(stream, startPosition, length, direction) {
var urlObj = JSON.parse(JSON.stringify(config));
- urlObj.pathname = '/streams/' + stream + '/' + startPosition + '/' + direction + '/' + length + '?embed=body';
+ ... |
19b6f0dadb1b1c6cfe400d984a0f600d1792f64a | app.js | app.js | var pg = require('pg');
var Hapi = require('hapi');
var server = new Hapi.Server();
server.connection({ port: 3000 });
server.start(function () {
console.log('Server running at:', server.info.uri);
});
server.route({
method: 'GET',
path: '/',
handler: function (request, reply) {
re... | var pg = require('pg');
var Hapi = require('hapi');
var server = new Hapi.Server();
server.connection({ port: 3000 });
server.start(function () {
console.log('Server running at:', server.info.uri);
});
server.route({
method: 'GET',
path: '/',
handler: function (request, reply) {
re... | Add scaffolding for GET /objects route | Add scaffolding for GET /objects route
| JavaScript | bsd-2-clause | SpotScore/spotscore | ---
+++
@@ -18,3 +18,30 @@
reply('Hello from SpotScore API!');
}
});
+
+server.route({
+ method: 'GET',
+ path: '/',
+ handler: function (request, reply) {
+ reply('Hello from SpotScore API!');
+ }
+});
+
+server.route({
+ method: 'GET',
+ path: '/objects',
+ h... |
ca089141843e432b4c7f12f7909763b8bf3d9f76 | validations/listTagsOfResource.js | validations/listTagsOfResource.js | exports.types = {
ResourceArns: {
type: 'String',
required: true,
tableName: false,
regex: 'arn:aws:dynamodb:(.+):(.+):table/(.+)',
},
}
| exports.types = {
ResourceArns: {
type: 'String',
required: false,
tableName: false,
regex: 'arn:aws:dynamodb:(.+):(.+):table/(.+)',
},
}
| Make arn optional in ListTagsOfResrouces | Make arn optional in ListTagsOfResrouces
| JavaScript | mit | mapbox/dynalite,mhart/dynalite | ---
+++
@@ -1,7 +1,7 @@
exports.types = {
ResourceArns: {
type: 'String',
- required: true,
+ required: false,
tableName: false,
regex: 'arn:aws:dynamodb:(.+):(.+):table/(.+)',
}, |
3843af6e6b73122b41b5831e9958653083e344df | cms.js | cms.js | #!/usr/bin/env node
'use strict'
const sergeant = require('sergeant')
const app = sergeant({ description: 'CMS for erickmerchant.com' })
require('./src/commands/update.js')(app)
require('./src/commands/watch.js')(app)
require('./src/commands/move.js')(app)
require('./src/commands/make.js')(app)
app.run()
| #!/usr/bin/env node
'use strict'
const sergeant = require('sergeant')
const app = sergeant({ description: 'CMS for erickmerchant.com' })
const commands = ['update', 'watch', 'move', 'make']
commands.forEach(function (command) {
require('./src/commands/' + command + '.js')(app)
})
app.run()
| Make adding new commands easier | Make adding new commands easier
| JavaScript | mit | erickmerchant/erickmerchant.com-source,erickmerchant/erickmerchant.com-source | ---
+++
@@ -3,10 +3,10 @@
const sergeant = require('sergeant')
const app = sergeant({ description: 'CMS for erickmerchant.com' })
+const commands = ['update', 'watch', 'move', 'make']
-require('./src/commands/update.js')(app)
-require('./src/commands/watch.js')(app)
-require('./src/commands/move.js')(app)
-requ... |
8da0be01e5286b0afd79b22646075d75321f8a64 | packages/@glimmer/component/ember-cli-build.js | packages/@glimmer/component/ember-cli-build.js | "use strict";
const build = require('@glimmer/build');
const packageDist = require('@glimmer/build/lib/package-dist');
const buildVendorPackage = require('@glimmer/build/lib/build-vendor-package');
const funnel = require('broccoli-funnel');
const path = require('path');
module.exports = function() {
let vendorTrees... | "use strict";
const build = require('@glimmer/build');
const packageDist = require('@glimmer/build/lib/package-dist');
const buildVendorPackage = require('@glimmer/build/lib/build-vendor-package');
const funnel = require('broccoli-funnel');
const path = require('path');
module.exports = function() {
let vendorTrees... | Add @glimmer/env to vendor.js in local builds. | Add @glimmer/env to vendor.js in local builds.
| JavaScript | mit | glimmerjs/glimmer.js,glimmerjs/glimmer.js,glimmerjs/glimmer.js,glimmerjs/glimmer.js | ---
+++
@@ -17,7 +17,8 @@
'@glimmer/runtime',
'@glimmer/syntax',
'@glimmer/util',
- '@glimmer/wire-format'
+ '@glimmer/wire-format',
+ '@glimmer/env'
].map(packageDist);
vendorTrees.push(buildVendorPackage('simple-html-tokenizer'));
@@ -33,7 +34,8 @@
'@glimmer/reference',
... |
bb4f8f8de62b216ebb7108322e640903a992ffe6 | webapp/roverMaster/roverMaster.js | webapp/roverMaster/roverMaster.js | 'use strict';
/**
* Module for the roverMaster view.
*/
angular.module('myApp.roverMaster', [])
.controller('RoverMasterCtrl', ['roverService', '$scope', '$location', '$mdMedia',
function(roverService, $scope, $location, $mdMedia) {
/**
* URL where the camera stream is accessible on the rover.
* @typ... | 'use strict';
/**
* Module for the roverMaster view.
*/
angular.module('myApp.roverMaster', [])
.controller('RoverMasterCtrl', ['roverService', '$scope', '$location', '$mdMedia',
function(roverService, $scope, $location, $mdMedia) {
/**
* URL where the camera stream is accessible on the rover.
* @typ... | Make rover master unavailable for mobile devices | Make rover master unavailable for mobile devices
Now, users with a small device (!gt-md in Material Angular speak) are redirected to main when they try to access the page via the URL.
| JavaScript | agpl-3.0 | weiss19ja/amos-ss16-proj2,weiss19ja/amos-ss16-proj2,weiss19ja/amos-ss16-proj2,weiss19ja/amos-ss16-proj2 | ---
+++
@@ -18,8 +18,11 @@
$scope.roverState = roverService.roverState;
/**
- * As soon as the view is opened, we try to register this user as a driver.
+ * Initialization:
+ * As soon as the view is opened, redirect the user iff he is on a mobile device - this view is not for them!
+ * If... |
4092fa469058ff300c8cb3211afde5a0878ad99c | app/adapters/application.js | app/adapters/application.js | import DS from 'ember-data';
import ENV from '../config/environment';
import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';
export default DS.JSONAPIAdapter.extend(DataAdapterMixin, {
host: ENV.APP.API_HOST_DIRECT,
namespace: ENV.APP.API_NAMESPACE,
coalesceFindRequests: true,
authorizer: ... | import DS from 'ember-data';
import ENV from '../config/environment';
import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';
export default DS.JSONAPIAdapter.extend(DataAdapterMixin, {
host: ENV.APP.API_HOST,
namespace: ENV.APP.API_NAMESPACE,
coalesceFindRequests: true,
authorizer: 'author... | Revert "Add data adapter hsot" | Revert "Add data adapter hsot"
This reverts commit 20a22994a4b619ec58e123de3eb7c4de9f4af786.
| JavaScript | bsd-2-clause | barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web | ---
+++
@@ -3,7 +3,7 @@
import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';
export default DS.JSONAPIAdapter.extend(DataAdapterMixin, {
- host: ENV.APP.API_HOST_DIRECT,
+ host: ENV.APP.API_HOST,
namespace: ENV.APP.API_NAMESPACE,
coalesceFindRequests: true,
authorizer: 'authorize... |
ba28bcf7e0bf78c076f8e89615f02db1fdb8f68e | app/containers/FacetPage.js | app/containers/FacetPage.js | import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Facets from '../components/Facets';
import * as Window1Actions from '../actions/window1';
function mapStateToProps(state) {
return {
facets: state.window1.facets
};
}
function mapDispatchToProps(dispatch) {
return bind... | import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Facets from '../components/facets';
import * as Window1Actions from '../actions/window1';
function mapStateToProps(state) {
return {
facets: state.window1.facets
};
}
function mapDispatchToProps(dispatch) {
return bind... | Update file reference for Linux CI build | Update file reference for Linux CI build
| JavaScript | mit | Fresh-maker/razor-client,Fresh-maker/razor-client | ---
+++
@@ -1,6 +1,6 @@
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
-import Facets from '../components/Facets';
+import Facets from '../components/facets';
import * as Window1Actions from '../actions/window1';
function mapStateToProps(state) { |
87db41619d552167ca86cf0db2df2f85dc59d39c | js/ChaptersDirective.js | js/ChaptersDirective.js | (function(app){
"use strict"
/**
* Creates a new HTML element ov-index to create an openVeo player
* index, with a list of presentation slides.
* It requires ovPlayerDirectory global variable to be defined and have
* a value corresponding to the path of the openVeo Player
* root directory.
*
... | (function(app){
"use strict"
/**
* Creates a new HTML element ov-index to create an openVeo player
* index, with a list of presentation slides.
* It requires ovPlayerDirectory global variable to be defined and have
* a value corresponding to the path of the openVeo Player
* root directory.
*
... | Correct bug on chapters when playing a chapter | Correct bug on chapters when playing a chapter
The chapter wasn't playing due to the wrong reference of the exposed function setTime.
| JavaScript | agpl-3.0 | veo-labs/openveo-player,veo-labs/openveo-player,veo-labs/openveo-player | ---
+++
@@ -42,7 +42,7 @@
*/
scope.goToTimecode = function(time){
if(time <= 1)
- playerCtrl.player.setTime(time * scope.duration);
+ playerCtrl.setTime(time * scope.duration);
};
}; |
681fb10e7f256b0ac0ac78560d40c8b0ce3b60a8 | js/myapp/card-detail.js | js/myapp/card-detail.js |
// ----------------------------------------------------------------
// CardDetail Class
// ----------------------------------------------------------------
// Model
class CardDetailModel extends CommonModel {
constructor({
name
} = {}) {
super({
name: name
});
this.NAME = 'Card Detail ... |
// ----------------------------------------------------------------
// CardDetail Class
// ----------------------------------------------------------------
// Model
class CardDetailModel extends CommonModel {
constructor({
name
} = {}) {
super({
name: name
});
this.NAME = 'Card Detail ... | Move ID & HASH & CARD in CardDetail classes | Move ID & HASH & CARD in CardDetail classes
from Controller to Model
| JavaScript | mit | AyaNakazawa/business_card_bank,AyaNakazawa/business_card_bank,AyaNakazawa/business_card_bank | ---
+++
@@ -15,6 +15,10 @@
this.NAME = 'Card Detail Model';
this.EVENT = PS.CDE;
+
+ this.ID = null;
+ this.HASH = null;
+ this.CARD = null;
}
}
@@ -40,9 +44,6 @@
this.view = new CardDetailView(this.model);
this.NAME = 'Card Detail Controller';
- this.model.ID = n... |
de73ed27b1ff6b39559e852013e3f1d1184e7a70 | sencha-workspace/SlateAdmin/app/model/person/progress/ProgressNote.js | sencha-workspace/SlateAdmin/app/model/person/progress/ProgressNote.js | /*jslint browser: true, undef: true, white: false, laxbreak: true *//*global Ext,Slate*/
Ext.define('SlateAdmin.model.person.progress.ProgressNote', {
extend: 'Ext.data.Model',
idProperty: 'ID',
fields: [
'Subject',
{
name: 'ID',
type: 'integer',
useNull:... | /*jslint browser: true, undef: true, white: false, laxbreak: true *//*global Ext,Slate*/
Ext.define('SlateAdmin.model.person.progress.ProgressNote', {
extend: 'Ext.data.Model',
idProperty: 'ID',
fields: [
'Subject',
{
name: 'ID',
type: 'integer',
useNull:... | Include author in progress notes | Include author in progress notes
| JavaScript | mit | SlateFoundation/slate-admin,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate-admin,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate | ---
+++
@@ -58,12 +58,7 @@
],
proxy: {
type: 'slaterecords',
- writer: {
- type: 'json',
- rootProperty: 'data',
- writeAllFields: false,
- allowSingle: false
- },
- url: '/notes'
+ url: '/notes',
+ include: ['Author']
... |
558c5ac7ccb2d32138eba39c943219244cd7b619 | code/js/requireContent.js | code/js/requireContent.js | require.load = function (context, moduleName, url) {
var xhr;
xhr = new XMLHttpRequest();
xhr.open("GET", chrome.extension.getURL(url) + '?r=' + new Date().getTime(), true);
xhr.onreadystatechange = function (e) {
if (xhr.readyState === 4 && xhr.status === 200) {
eval(xhr.responseText);
context.... | require.load = function (context, moduleName, url) {
var xhr;
xhr = new XMLHttpRequest();
xhr.open("GET", chrome.extension.getURL(url) + '?r=' + new Date().getTime(), true);
xhr.onreadystatechange = function (e) {
if (xhr.readyState === 4 && xhr.status === 200) {
eval(xhr.responseText + "\n//@ sourceU... | Make debugging easier by adding sourceURL | Make debugging easier by adding sourceURL
See here for more details http://stackoverflow.com/questions/15732017/trouble-debugging-content-scripts-in-a-chrome-extension-using-require-js | JavaScript | mit | tedbow/drupal-pull-requests,lautis/github-awesome-autocomplete,clementlamoureux/gpm-popularity,alivedise/chrome-extension-skeleton,lautis/github-awesome-autocomplete,tedbow/drupal-pull-requests,clementlamoureux/gpm-popularity,salsita/chrome-extension-skeleton,TomTom101/CyfeFormatting,onemrkarthik/chrome-extension-skele... | ---
+++
@@ -4,7 +4,7 @@
xhr.open("GET", chrome.extension.getURL(url) + '?r=' + new Date().getTime(), true);
xhr.onreadystatechange = function (e) {
if (xhr.readyState === 4 && xhr.status === 200) {
- eval(xhr.responseText);
+ eval(xhr.responseText + "\n//@ sourceURL=" + url);
context.compl... |
65f3644a962e0ff13bcfd837b3960c7aa6179ccb | packages/google-oauth/package.js | packages/google-oauth/package.js | Package.describe({
summary: "Google OAuth flow",
version: "1.2.6",
});
const cordovaPluginGooglePlusURL =
// This revision is from the "update-entitlements-plist-files" branch.
// This logic can be reverted when/if this PR is merged:
// https://github.com/EddyVerbruggen/cordova-plugin-googleplus/pull/366
"... | Package.describe({
summary: "Google OAuth flow",
version: "1.3.0",
});
Cordova.depends({
"cordova-plugin-googleplus": "8.4.0",
});
Package.onUse(api => {
api.use("ecmascript");
api.use('oauth2', ['client', 'server']);
api.use('oauth', ['client', 'server']);
api.use('http', ['server']);
api.use('servic... | Stop using our fork of cordova-plugin-googleplus. | Stop using our fork of cordova-plugin-googleplus.
The PR that we were waiting on got merged in April 2018:
https://github.com/EddyVerbruggen/cordova-plugin-googleplus/pull/366
| JavaScript | mit | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor | ---
+++
@@ -1,16 +1,10 @@
Package.describe({
summary: "Google OAuth flow",
- version: "1.2.6",
+ version: "1.3.0",
});
-const cordovaPluginGooglePlusURL =
- // This revision is from the "update-entitlements-plist-files" branch.
- // This logic can be reverted when/if this PR is merged:
- // https://github... |
a4cb851373f648d744a11adf04008f516e1931a3 | src/server/api/auth.js | src/server/api/auth.js | import express from 'express';
const router = express.Router();
router.route('/login')
.post(function(req, res, next) {
const {password} = req.body;
// Simulate DB checks here
setTimeout(() => {
if (password !== 'pass1')
res.status(400).end();
else
res.status(200).end();
... | import express from 'express';
const router = express.Router();
router.route('/login')
.post(function(req, res, next) {
const {password} = req.body;
// Simulate DB checks here.
setTimeout(() => {
if (password !== 'pass1')
res.status(400).end();
else
res.status(200).end();
... | Fix server login simulation timeout. | Fix server login simulation timeout.
| JavaScript | mit | TheoMer/Gyms-Of-The-World,GarrettSmith/schizophrenia,glaserp/Maturita-Project,grabbou/este,zanj2006/este,obimod/este,nezaidu/este,christophediprima/este,amrsekilly/updatedEste,sljuka/portfulio,neozhangthe1/framedrop-web,estaub/my-este,TheoMer/este,TheoMer/Gyms-Of-The-World,syroegkin/mikora.eu,puzzfuzz/othello-redux,ska... | ---
+++
@@ -7,13 +7,13 @@
const {password} = req.body;
- // Simulate DB checks here
+ // Simulate DB checks here.
setTimeout(() => {
if (password !== 'pass1')
res.status(400).end();
else
res.status(200).end();
- });
+ }, 1000);
});
|
3ecee91ed99cb1156bfcb896dcd55f37d6114de6 | app/views/in_place_field.js | app/views/in_place_field.js | //
//https://github.com/mszoernyi/ember-inplace-edit
//
var InPlaceFieldView = Ember.View.extend({
tagName: 'div',
isEditing: false,
layoutName: "in_place_edit",
templateName: function(){
if(this.get("contentType") === 'currency'){
return 'in_place_currency_field';
} else {
return 'in_place... | //
//https://github.com/mszoernyi/ember-inplace-edit
//
var InPlaceFieldView = Ember.View.extend({
tagName: 'span',
isEditing: false,
layoutName: "in_place_edit",
templateName: function(){
if(this.get("contentType") === 'currency'){
return 'in_place_currency_field';
} else {
return 'in_plac... | Use span tag for InPlaceFieldView | Use span tag for InPlaceFieldView
| JavaScript | mit | dierbro/ember-invoice | ---
+++
@@ -3,7 +3,7 @@
//
var InPlaceFieldView = Ember.View.extend({
- tagName: 'div',
+ tagName: 'span',
isEditing: false,
layoutName: "in_place_edit",
templateName: function(){ |
651601458d1c0e7a7ad407927715bed6b57ed8fd | test/normal-feed-test.js | test/normal-feed-test.js | 'use strict'
const assert = require('assert')
const assertCalled = require('assert-called')
const CouchDBChangesResponse = require('../')
const changes = [
{
id: 'foo',
changes: [{ rev: '2-578db51f2d332dd53a5ca02cf6ca5b54' }],
seq: 12
},
{
id: 'bar',
changes: [{ rev: '4-378db51f2d332dd53a5ca... | 'use strict'
const assert = require('assert')
const assertCalled = require('assert-called')
const CouchDBChangesResponse = require('../')
const changes = [
{
id: 'foo',
changes: [{ rev: '2-578db51f2d332dd53a5ca02cf6ca5b54' }],
seq: 12
},
{
id: 'bar',
changes: [{ rev: '4-378db51f2d332dd53a5ca... | Use the `seq` from the fixture | Use the `seq` from the fixture
| JavaScript | mit | mmalecki/couchdb-changes-response | ---
+++
@@ -31,7 +31,7 @@
stream.once('finish', assertCalled(() => {
assert.deepEqual(JSON.parse(chunks.join('')), {
results: changes,
- last_seq: 14
+ last_seq: changes[1].seq
})
}))
|
11048af9b86e271c3ac57135f0102bb8758063ea | config/karma-base.conf.js | config/karma-base.conf.js | module.exports = {
basePath: '..',
singleRun: true,
client: {
captureConsole: true
},
browsers: [
'PhantomJS'
],
frameworks: [
'tap'
],
files: [
'tests.bundle.js'
],
preprocessors: {
'tests.bundle.js': [
'webpack',
'sourcemap'
]
},
webpackServer: {
noInf... | module.exports = {
basePath: '..',
singleRun: true,
client: {
captureConsole: true
},
browsers: [
'PhantomJS'
],
frameworks: [],
files: [
'tests.bundle.js'
],
preprocessors: {
'tests.bundle.js': [
'webpack',
'sourcemap'
]
},
webpackServer: {
noInfo: true
}
}... | Remove tap framework (we don't seem to actually be using it) | Remove tap framework (we don't seem to actually be using it)
| JavaScript | apache-2.0 | Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela | ---
+++
@@ -7,9 +7,7 @@
browsers: [
'PhantomJS'
],
- frameworks: [
- 'tap'
- ],
+ frameworks: [],
files: [
'tests.bundle.js'
], |
53deda631d9087c5635e5a52f6633558fd87b0a4 | tests/datasourceTests.js | tests/datasourceTests.js | var datasourceTools = require("../source/tools/datasource.js");
module.exports = {
setUp: function(cb) {
(cb)();
},
extractDSStrProps: {
testExtractsProperties: function(test) {
let props = "ds=text,something=1,another-one=something.else,empty=",
extracted = datasourceToo... | var datasourceTools = require("../source/tools/datasource.js");
module.exports = {
setUp: function(cb) {
(cb)();
},
extractDSStrProps: {
testExtractsProperties: function(test) {
var props = "ds=text,something=1,another-one=something.else,empty=",
extracted = datasourceToo... | Remove let in datasource tools tests | Remove let in datasource tools tests
| JavaScript | mit | buttercup-pw/buttercup-core,buttercup/buttercup-core,buttercup/buttercup-core,buttercup-pw/buttercup-core,perry-mitchell/buttercup-core,buttercup/buttercup-core,perry-mitchell/buttercup-core | ---
+++
@@ -9,7 +9,7 @@
extractDSStrProps: {
testExtractsProperties: function(test) {
- let props = "ds=text,something=1,another-one=something.else,empty=",
+ var props = "ds=text,something=1,another-one=something.else,empty=",
extracted = datasourceTools.extract... |
f9b2be5b573981102a9b67dde26ea642ccbbbc14 | api/user/data.js | api/user/data.js | var bcrypt = require( 'bcrypt' );
var appModels = require( '../models' );
var MongooseDataManager = require( '../utils/data_manager' ).MongooseDataManager;
var systemError = require( '../utils' ).systemError;
exports.standard = MongooseDataManager( appModels.User );
exports.createAdmin = function ( email, password,... | var bcrypt = require( 'bcrypt' );
var appModels = require( '../models' );
var MongooseDataManager = require( '../utils/data_manager' ).MongooseDataManager;
var systemError = require( '../utils/error_messages' ).systemError;
exports.standard = MongooseDataManager( appModels.User );
exports.createAdmin = function ( e... | Update error messages in user | Update error messages in user
| JavaScript | mit | projectweekend/Node-Backend-Seed | ---
+++
@@ -1,7 +1,7 @@
var bcrypt = require( 'bcrypt' );
var appModels = require( '../models' );
var MongooseDataManager = require( '../utils/data_manager' ).MongooseDataManager;
-var systemError = require( '../utils' ).systemError;
+var systemError = require( '../utils/error_messages' ).systemError;
exports... |
52d037d9093a18ebdf15d1c00b959cae06aa345b | api/models/submission.js | api/models/submission.js | const Sequelize = require('sequelize');
const sequelize = require('./');
const Stage = require('./stage');
const Submission = sequelize.define('submissions', {
name: {
type: Sequelize.STRING,
allowNull: false,
validate: {
len: [1, 100],
},
},
board: {
type: Sequelize.TEXT,
allowNull: false,
},
blo... | const Sequelize = require('sequelize');
const sequelize = require('./');
const Stage = require('./stage');
const Submission = sequelize.define('submissions', {
name: {
type: Sequelize.STRING,
allowNull: false,
validate: {
len: [1, 100],
},
},
board: {
type: Sequelize.TEXT,
allowNull: false,
},
blo... | Add version field to model definition | Add version field to model definition
| JavaScript | mit | tsg-ut/mnemo,tsg-ut/mnemo | ---
+++
@@ -43,6 +43,14 @@
key: 'id',
},
},
+ version: {
+ type: Sequelize.INTEGER,
+ allowNull: false,
+ defaultValue: 1,
+ validate: {
+ min: 1,
+ },
+ },
});
Submission.belongsTo(Stage); |
3624b7e57ed103d206fc1007042a971b9c4f36e4 | LayoutTests/fast/repaint/resources/text-based-repaint.js | LayoutTests/fast/repaint/resources/text-based-repaint.js | // Asynchronous tests should manually call finishRepaintTest at the appropriate time.
window.testIsAsync = false;
function runRepaintTest()
{
if (!window.testRunner || !window.internals) {
setTimeout(repaintTest, 100);
return;
}
if (window.enablePixelTesting)
testRunner.dumpAsTextW... | // Asynchronous tests should manually call finishRepaintTest at the appropriate time.
window.testIsAsync = false;
function runRepaintTest()
{
if (!window.testRunner || !window.internals) {
setTimeout(repaintTest, 100);
return;
}
if (window.enablePixelTesting)
testRunner.dumpAsTextW... | Make text based repaint output not appear in images | Make text based repaint output not appear in images
BUG=345027
Review URL: https://codereview.chromium.org/197553008
git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@169165 bbb929c8-8fbe-4397-9dbb-9b2b20218538
| JavaScript | bsd-3-clause | nwjs/blink,jtg-gg/blink,smishenk/blink-crosswalk,hgl888/blink-crosswalk-efl,ondra-novak/blink,crosswalk-project/blink-crosswalk-efl,Pluto-tv/blink-crosswalk,PeterWangIntel/blink-crosswalk,kurli/blink-crosswalk,jtg-gg/blink,crosswalk-project/blink-crosswalk-efl,PeterWangIntel/blink-crosswalk,ondra-novak/blink,kurli/blin... | ---
+++
@@ -39,6 +39,7 @@
internals.stopTrackingRepaints(document);
var pre = document.createElement('pre');
+ pre.style.opacity = 0; // appear in text dumps, but not images
document.body.appendChild(pre);
pre.textContent += repaintRects;
|
0c312222e9ba61cb04b931de05374d9ba6092504 | examples/todomvc-flux/js/components/Header.react.js | examples/todomvc-flux/js/components/Header.react.js | /**
* Copyright 2013-2014 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | /**
* Copyright 2013-2014 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Update todo example. fixes 'Create' that shouldn't happen | Update todo example. fixes 'Create' that shouldn't happen
Currently, an `onBlur` creates a new todo on `TodoTextInput`. This makes sense for existing items but not for new items. I.e consider the following:
1. cursor on new item ("What needs to be done?")
2. click 'x' on the first item.
This results in two ac... | JavaScript | bsd-3-clause | haoxutong/react,stevemao/react,dilidili/react,jzmq/react,stanleycyang/react,lastjune/react,yiminghe/react,bhamodi/react,JoshKaufman/react,jeffchan/react,reggi/react,dariocravero/react,cinic/react,flipactual/react,labs00/react,ridixcr/react,nLight/react,pswai/react,VukDukic/react,dilidili/react,zyt01/react,zyt01/react,S... | ---
+++
@@ -45,7 +45,10 @@
* @param {string} text
*/
_onSave: function(text) {
- TodoActions.create(text);
+ if(text.trim()){
+ TodoActions.create(text);
+ }
+
}
}); |
25b360031ef79e8b22c1860fd9e1e3c5624cba55 | controllers/APIService.js | controllers/APIService.js | /*
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
This file is part of the Smart Developer Hub Project:
http://www.smartdeveloperhub.org/
Center for Open Middleware
http://www.centeropenmiddleware.com/
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=... | /*
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
This file is part of the Smart Developer Hub Project:
http://www.smartdeveloperhub.org/
Center for Open Middleware
http://www.centeropenmiddleware.com/
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=... | Make dynamic host in /API | Make dynamic host in /API
| JavaScript | apache-2.0 | SmartDeveloperHub/sdh-api | ---
+++
@@ -25,9 +25,9 @@
var fs = require('fs');
exports.apiInfo = function() {
-
+ var aux = JSON.parse(fs.readFileSync('./api/swagger.json', 'utf8'));
return {
- "swaggerjson" : JSON.parse(fs.readFileSync('./api/swagger.json', 'utf8')),
- "host" : "http://localhost:8080"
+ "swagger... |
55c29a7112d79b04a9121f5df62b0aaf55b866b2 | task/default/common.js | task/default/common.js | // common.js
var gulp = require('gulp'),
$ = require('gulp-load-plugins')(),
helper = require('../helper'),
path = require('../path');
// Base
gulp.task('common', function() {
var name = 'Common';
return gulp.src(path.source.main + '*.*', {
dot: true
})
.pipe($.plumber(helper.error))
.pipe(gulp.... | // common.js
var gulp = require('gulp'),
$ = require('gulp-load-plugins')(),
helper = require('../helper'),
path = require('../path');
// Base
gulp.task('common', function() {
var name = 'Common';
return gulp.src(path.source.main + '{*.*,_redirects}', {
dot: true
})
.pipe($.plumber(helper.error))
... | Configure gulp task to copy the redirects-configuration file properly | Configure gulp task to copy the redirects-configuration file properly
| JavaScript | cc0-1.0 | thasmo/website | ---
+++
@@ -9,7 +9,7 @@
gulp.task('common', function() {
var name = 'Common';
- return gulp.src(path.source.main + '*.*', {
+ return gulp.src(path.source.main + '{*.*,_redirects}', {
dot: true
})
.pipe($.plumber(helper.error)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.