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})
.pipe(ignore('node_modules/**'))
.pipe(rimraf());
});
})();
| (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/screenshots/'], {read: false})
.pipe(ignore('node_modules/**'))
.pipe(rimraf());
});
})();
| 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: false})
+ .src([paths.dest, paths.tmp, 'reports/protractor-e2e/screenshots/'], {read: false})
.pipe(ignore('node_modules/**'))
.pipe(rimraf());
}); |
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: Song
}
]
})
.map(history => history.toJSON())
.map(history => _.extend(
{},
history.Song,
history
))
res.send(_.uniqBy(histories, history => history.SongId))
} catch (err) {
res.status(500).send({
error: 'an error has occured trying to fetch the history'
})
}
},
async post (req, res) {
try {
const userId = req.user.id
const {songId} = req.body
const history = await History.create({
SongId: songId,
UserId: userId
})
res.send(history)
} catch (err) {
console.log(err)
res.status(500).send({
error: 'an error has occured trying to create the history object'
})
}
}
}
| 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: Song
}
],
order: [
['createdAt', 'DESC']
]
})
.map(history => history.toJSON())
.map(history => _.extend(
{},
history.Song,
history
))
res.send(_.uniqBy(histories, history => history.SongId))
} catch (err) {
res.status(500).send({
error: 'an error has occured trying to fetch the history'
})
}
},
async post (req, res) {
try {
const userId = req.user.id
const {songId} = req.body
const history = await History.create({
SongId: songId,
UserId: userId
})
res.send(history)
} catch (err) {
console.log(err)
res.status(500).send({
error: 'an error has occured trying to create the history object'
})
}
}
}
| 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 => {
run(t, 'a { color: #FFC0CB; }',
'a { color: transparent; text-shadow: 0 0 5px rgba(255, 192, 203, 1) }');
});
test('adds blur to image', t => {
run(t, 'img {}',
'img { filter: blur(5px); }');
});
| 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 => {
run(t, 'a { color: #FFC0CB; }',
'a { color: transparent; text-shadow: 0 0 5px rgba(255, 192, 203, 1) }');
});
test('adds blur to image', t => {
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); }');
});
| 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[++i]);
} else if (chunk.length) {
tagName = chunk;
}
}
return {
tag: tagName || 'div',
id,
className: classNames.join(' ')
};
}
| 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[++i]);
} else if (chunk.length) {
tagName = chunk;
}
}
return {
tag: tagName || 'div',
id,
className: classNames.join(' ')
};
}
| 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(error, req);
if (isJSON) {
return youch.toJSON();
}
return youch.toHTML();
}
/**
* Handle exception thrown during the HTTP lifecycle
*
* @method handle
*
* @param {Object} error
* @param {Object} options.request
* @param {Object} options.response
*
* @return {void}
*/
async handle (error, { request, response, view }) {
//if (process.env.NODE_ENV === 'development') {
const isJSON = request.accepts(['html', 'json']) === 'json';
const formattedError = await this._getYouchError(error, request.request, isJSON);
response
.status(error.status)
.send(formattedError);
return;
//}
response
.status(error.status)
.send(view.render('frontend.error', { error: error }));
}
/**
* Report exception for logging or debugging.
*
* @method report
*
* @param {Object} error
* @param {Object} options.request
*
* @return {void}
*/
async report (error, { request }) {
}
}
module.exports = ExceptionHandler
| '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(error, req);
if (isJSON) {
return youch.toJSON();
}
return youch.toHTML();
}
/**
* Handle exception thrown during the HTTP lifecycle
*
* @method handle
*
* @param {Object} error
* @param {Object} options.request
* @param {Object} options.response
*
* @return {void}
*/
async handle (error, { request, response, view }) {
if (process.env.NODE_ENV === 'development') {
const isJSON = request.accepts(['html', 'json']) === 'json';
const formattedError = await this._getYouchError(error, request.request, isJSON);
response
.status(error.status)
.send(formattedError);
return;
}
response
.status(error.status)
.send(view.render('frontend.error', { error: error }));
}
/**
* Report exception for logging or debugging.
*
* @method report
*
* @param {Object} error
* @param {Object} options.request
*
* @return {void}
*/
async report (error, { request }) {
}
}
module.exports = ExceptionHandler
| 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 this._getYouchError(error, request.request, isJSON);
response
.status(error.status)
.send(formattedError);
return;
- //}
+ }
response
.status(error.status) |
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>]+)/);
return tag && tag[1];
}
function createFromHtml (html) {
var par = document.createElement(specialMap[matchTag(html)] || 'div');
par.innerHTML = html;
return init(par.firstElementChild);
}
function createFromName (name) {
var ctor = registry.get(name);
return ctor && ctor() || document.createElement(name);
}
export default function (name, props) {
name = name.trim();
return assign(name[0] === '<' ? createFromHtml(name) : createFromName(name), props);
}
| 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 target = document.createElement('div');
var levels = 0;
while (tag) {
html = `<${tag}>${html}</${tag}>`;
tag = specialMap[tag];
++levels;
}
target.innerHTML = html;
for (let a = 0; a <= levels; a++) {
target = target.firstElementChild;
}
return target;
}
function matchTag (dom) {
var tag = dom.match(/\s*<([^\s>]+)/);
return tag && tag[1];
}
function createFromHtml (html) {
var tag = specialMap[matchTag(html)];
var par = document.createElement(tag || 'div');
par.innerHTML = html;
return init(par.firstElementChild || fixIeNotAllowingInnerHTMLOnTableElements(tag, html));
}
function createFromName (name) {
var ctor = registry.get(name);
return ctor && ctor() || document.createElement(name);
}
export default function (name, props) {
name = name.trim();
return assign(name[0] === '<' ? createFromHtml(name) : createFromName(name), props);
}
| 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;
+ for (let a = 0; a <= levels; a++) {
+ target = target.firstElementChild;
+ }
+
+ return target;
+}
+
function matchTag (dom) {
var tag = dom.match(/\s*<([^\s>]+)/);
return tag && tag[1];
}
function createFromHtml (html) {
- var par = document.createElement(specialMap[matchTag(html)] || 'div');
+ var tag = specialMap[matchTag(html)];
+ var par = document.createElement(tag || 'div');
par.innerHTML = html;
- return init(par.firstElementChild);
+ return init(par.firstElementChild || fixIeNotAllowingInnerHTMLOnTableElements(tag, html));
}
function createFromName (name) { |
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')
.expect('Content-Type', /json/)
.expect(200, done);
});
it('gets a strategy by name', function (done) {
request
.get('/strategies/default')
.expect('Content-Type', /json/)
.expect(200, done);
});
it('creates a new strategy', function (done) {
request
.post('/strategies')
.send({name: 'myCustomStrategy', description: 'Best strategy ever.'})
.set('Content-Type', 'application/json')
.expect(201, done);
});
it('requires new strategies to have a name', function (done) {
request
.post('/strategies')
.send({name: ''})
.set('Content-Type', 'application/json')
.expect(400, done);
});
}); | 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')
.expect('Content-Type', /json/)
.expect(200, done);
});
it('gets a strategy by name', function (done) {
request
.get('/strategies/default')
.expect('Content-Type', /json/)
.expect(200, done);
});
it('creates a new strategy', function (done) {
request
.post('/strategies')
.send({name: 'myCustomStrategy', description: 'Best strategy ever.'})
.set('Content-Type', 'application/json')
.expect(201, done);
});
it('requires new strategies to have a name', function (done) {
request
.post('/strategies')
.send({name: ''})
.set('Content-Type', 'application/json')
.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, done);
});
}); | 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, done);
+ });
+
}); |
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 textInputLook = require("./textInputLook")
const dropDownIcon = require("./icons/navigation/arrowDropDown")
const hoverable = require("../reaks/hoverable")
module.exports = function(opts, onAction) {
const { label: labelArg, iconColor } =
isString(opts) || isFunction(opts) ? { label: opts } : opts
return hoverable(
{
over: style.mixin({ backgroundColor: "rgba(0,0,0,0.1)" }),
},
clickable(
onAction,
textInputLook(
opts,
hFlex([
label(labelArg),
["fixed", icon({ icon: dropDownIcon, color: iconColor })],
])
)
)
)
}
| 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 textInputLook = require("./textInputLook")
const dropDownIcon = require("./icons/navigation/arrowDropDown")
const hoverable = require("../reaks/hoverable")
module.exports = function(opts, onAction) {
const { label: labelArg, valueDisplayer: valueDisplayerArg, iconColor } =
isString(opts) || isFunction(opts) ? { label: opts } : opts
const valueDisplayer = valueDisplayerArg ? valueDisplayerArg : label(labelArg)
return clickable(
onAction,
hoverable(
{ over: style.mixin({ backgroundColor: "rgba(0,0,0,0.1)" }) },
textInputLook(
opts,
hFlex([
valueDisplayer,
["fixed", icon({ icon: dropDownIcon, color: iconColor })],
])
)
)
)
}
| 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 = require("../reaks/label")
const style = require("../reaks/style")
const icon = require("../reaks-material/icon")
const textInputLook = require("./textInputLook")
@@ -10,19 +10,19 @@
const hoverable = require("../reaks/hoverable")
module.exports = function(opts, onAction) {
- const { label: labelArg, iconColor } =
+ const { label: labelArg, valueDisplayer: valueDisplayerArg, iconColor } =
isString(opts) || isFunction(opts) ? { label: opts } : opts
- return hoverable(
- {
- over: style.mixin({ backgroundColor: "rgba(0,0,0,0.1)" }),
- },
- clickable(
- onAction,
+ const valueDisplayer = valueDisplayerArg ? valueDisplayerArg : label(labelArg)
+
+ return clickable(
+ onAction,
+ hoverable(
+ { over: style.mixin({ backgroundColor: "rgba(0,0,0,0.1)" }) },
textInputLook(
opts,
hFlex([
- label(labelArg),
+ valueDisplayer,
["fixed", icon({ icon: dropDownIcon, color: iconColor })],
])
) |
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 camelCase;
| 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(capitalize, R.toLower)),
- R.split(' '),
- spaceCase
-);
+const camelCase = R.compose(uncapitalize, pascalCase);
export default camelCase; |
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-cli,Turbo87/ember-cli,ember-cli/ember-cli,mike-north/ember-cli,thoov/ember-cli,Turbo87/ember-cli,elwayman02/ember-cli,HeroicEric/ember-cli,fpauser/ember-cli,buschtoens/ember-cli,jrjohnson/ember-cli,fpauser/ember-cli,balinterdi/ember-cli,mike-north/ember-cli,ember-cli/ember-cli,cibernox/ember-cli,HeroicEric/ember-cli,raycohen/ember-cli,thoov/ember-cli,asakusuma/ember-cli,Turbo87/ember-cli,ember-cli/ember-cli,balinterdi/ember-cli,jgwhite/ember-cli,fpauser/ember-cli,HeroicEric/ember-cli,buschtoens/ember-cli,raycohen/ember-cli,kategengler/ember-cli | ---
+++
@@ -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('src'));
img.setAttribute('src', img.getAttribute('data-hd'));
});
zoomer.addEventListeners('hide', (event) => {
const img = event.currentTarget;
if (!img.hasAttribute('data-lowres')) return;
img.setAttribute('src', img.getAttribute('data-lowres'));
});
});
| 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 (!img.hasAttribute('data-hd')) return;
+
+ img.setAttribute('data-lowres', img.getAttribute('src'));
+ img.setAttribute('src', img.getAttribute('data-hd'));
+ });
+
+ zoomer.addEventListeners('hide', (event) => {
+ const img = event.currentTarget;
+
+ if (!img.hasAttribute('data-lowres')) return;
+
+ img.setAttribute('src', img.getAttribute('data-lowres'));
+ });
+}); |
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) {
return;
}
function sendUpdateEvent(type) {
let audioObject = window.ap._currentAudio;
if (!audioObject) {
return;
}
let audioElImpl = window.ap._impl._currentAudioEl || {};
let {currentTime, duration} = audioElImpl;
window.postMessage({
sender: 'web-scrobbler',
type,
currentTime,
duration,
trackInfo: {
uniqueID: audioObject[INFO_ID],
artistTrack: {
artist: audioObject[INFO_ARTIST],
track: audioObject[INFO_TRACK],
},
},
}, '*');
}
for (let e of ['start', 'progress', 'pause', 'stop']) {
window.ap.subscribers.push({
et: e,
cb: sendUpdateEvent.bind(null, e),
});
}
window.webScrobblerInjected = true;
})();
| '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) {
return;
}
function sendUpdateEvent(type) {
let audioObject = window.ap._currentAudio;
if (!audioObject) {
return;
}
let audioElImpl = window.ap._impl._currentAudioEl || {};
let {currentTime, duration} = audioElImpl;
window.postMessage({
sender: 'web-scrobbler',
type,
trackInfo: {
currentTime,
duration,
uniqueID: audioObject[INFO_ID],
artistTrack: {
artist: audioObject[INFO_ARTIST],
track: audioObject[INFO_TRACK],
},
},
}, '*');
}
for (let e of ['start', 'progress', 'pause', 'stop']) {
window.ap.subscribers.push({
et: e,
cb: sendUpdateEvent.bind(null, e),
});
}
window.webScrobblerInjected = true;
})();
| 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,galeksandrp/web-scrobbler,inverse/web-scrobbler,usdivad/web-scrobbler,Paszt/web-scrobbler | ---
+++
@@ -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 "./options"
export {Range, SelectionError} from "./selection"
export {MarkedRange} from "./range"
export {CommandSet, defineDefaultParamHandler, withParamHandler, Command} from "./command"
export {baseCommands} from "./base_commands"
import "./schema_commands"
import Keymap from "browserkeymap"
export {Keymap}
| // !! 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 "./options"
export {Range, SelectionError} from "./selection"
export {MarkedRange} from "./range"
export {CommandSet, Command} from "./command"
export {baseCommands} from "./base_commands"
import "./schema_commands"
import Keymap from "browserkeymap"
export {Keymap}
| 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/prosemirror,adrianheine/prosemirror | ---
+++
@@ -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 "./base_commands"
import "./schema_commands"
|
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 confirmEmail = ({args, ctx}) => db.transaction(async transaction => {
const {client} = ctx.state
const {hash} = args
const id = await get(hash)
if (!id) {
throw new BadRequest("The user cannot be activated: Bad token signature.")
}
let user = await User.findByPk(id, {transaction})
if (!user) {
throw new BadRequest("There's no such user.")
}
user = await waterfall([
() => remove(hash),
() => Session.destroy({where: {userId: user.id}, transaction}),
() => user.update({status: User.statuses.active}, {transaction}),
() => user.reload({transaction})
])
const tokens = await Session.sign({
client, user: user.toJSON()
}, {transaction})
return user.update({lastVisited: new Date()}, {transaction})
.then(() => tokens)
})
export default confirmEmail |> bind
| 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 confirmEmail = ({args, ctx}) => db.transaction(async transaction => {
const {client} = ctx.state
const {hash} = args
const id = await get(hash)
if (!id) {
throw new BadRequest("The user cannot be activated: Bad token signature.")
}
let user = await User.findByPk(id, {transaction})
if (!user) {
throw new BadRequest("There's no such user.")
}
user = await waterfall([
() => Session.destroy({where: {userId: user.id}, transaction}),
() => user.update({status: User.statuses.active}, {transaction}),
() => remove(hash),
() => user.reload({transaction})
])
const tokens = await Session.sign({
client, user: user.toJSON()
}, {transaction})
return user.update({lastVisited: new Date()}, {transaction})
.then(() => tokens)
})
export default confirmEmail |> bind
| 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',
restrict: 'EA',
scope: {
'inHeader': '='
},
templateUrl: 'app/layout/pv-top-nav.html'
};
/* @ngInject */
function TopNavController($scope, $document, $state) {
var vm = this;
activate();
function activate() {
checkWithinIntro();
$document.on('scroll', checkWithinIntro);
}
function checkWithinIntro() {
var aboutTopPosition = $document.find('#about').offset().top,
navbarHeight = $document.find('#pv-top-nav').height(),
triggerHeight = aboutTopPosition - navbarHeight - 1;
vm.inHeader = $state.current.url === '/' && $document.scrollTop() <= triggerHeight;
$scope.$applyAsync();
}
}
return directive;
}
})();
| (function() {
'use strict';
angular
.module('app.layout')
.directive('pvTopNav', pvTopNav);
/* @ngInject */
function pvTopNav () {
var directive = {
bindToController: true,
controller: TopNavController,
controllerAs: 'vm',
restrict: 'EA',
scope: {
'inHeader': '='
},
templateUrl: 'app/layout/pv-top-nav.html'
};
/* @ngInject */
function TopNavController($scope, $document, $state, $rootScope) {
var vm = this;
activate();
function activate() {
checkWithinIntro();
$document.on('scroll', checkWithinIntro);
$rootScope.$on('$viewContentLoaded', checkWithinIntro);
}
function checkWithinIntro() {
var aboutTopPosition = $document.find('#about').offset().top,
navbarHeight = $document.find('#pv-top-nav').height(),
triggerHeight = aboutTopPosition - navbarHeight - 1;
vm.inHeader = $state.current.url === '/' && $document.scrollTop() <= triggerHeight;
$scope.$applyAsync();
}
}
return directive;
}
})();
| 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();
$document.on('scroll', checkWithinIntro);
+ $rootScope.$on('$viewContentLoaded', checkWithinIntro);
}
function 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}`;
this.stack = (new Error()).stack;
this.name = this.constructor.name;
} |
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
* @constructor
*/
class Section extends React.Component {
static propTypes = {
/**
* The elements to be rendered in the section
*
* @property children
* @type {Node}
*/
children: React.PropTypes.node,
/**
* Pass a custom value for the title
*
* @property title
* @type {String}
*/
title: React.PropTypes.string.isRequired
}
/**
* Renders the component.
*
* @method render
* @return {Object} JSX
*/
render() {
return (
<div className={ `carbon-section ${this.props.className}` }>
<h2 className='carbon-section__title'>{ this.props.title }</h2>
{ this.props.children }
</div>
);
}
}
export default Section;
| 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
};
export default Section;
| 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:
- *
- * <Section />
- *
- * @class Section
- * @constructor
- */
-class Section extends React.Component {
- static propTypes = {
- /**
- * The elements to be rendered in the section
- *
- * @property children
- * @type {Node}
- */
- children: React.PropTypes.node,
+let Section = (props) =>
+ <div className={ `carbon-section ${props.className}` }>
+ <h2 className='carbon-section__title'>{ props.title }</h2>
+ { props.children }
+ </div>
+;
- /**
- * Pass a custom value for the title
- *
- * @property title
- * @type {String}
- */
- title: React.PropTypes.string.isRequired
- }
-
- /**
- * Renders the component.
- *
- * @method render
- * @return {Object} JSX
- */
- render() {
- return (
- <div className={ `carbon-section ${this.props.className}` }>
- <h2 className='carbon-section__title'>{ this.props.title }</h2>
- { this.props.children }
- </div>
- );
- }
-}
+Section.propTypes = {
+ children: React.PropTypes.node,
+ title: React.PropTypes.string.isRequired
+};
export default 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: {
'detail': {
'methods': ['delete', 'patch', 'put', 'get'],
'path': '/v1/instances/{instanceName}/admins/{id}/'
},
'list': {
'methods': ['get'],
'path': '/v1/instances/{instanceName}/admins/'
}
}
});
const Admin = stampit()
.compose(Model)
.setQuerySet(AdminQuerySet)
.setMeta(AdminMeta);
export default Admin;
| 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: {
'detail': {
'methods': ['delete', 'patch', 'put', 'get'],
'path': '/v1/instances/{instanceName}/admins/{id}/'
},
'list': {
'methods': ['get'],
'path': '/v1/instances/{instanceName}/admins/'
}
}
});
const Admin = stampit()
.compose(Model)
.setQuerySet(AdminQuerySet)
.setMeta(AdminMeta);
export default Admin;
| 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){
console.log('error ====>', err);
})
db.User
.build({
username: 'janedoe',
email: 'janedoe@tessel.io',
name: 'Jane Doe',
password: 'password',
})
.digest()
.genApiKey()
.save()
.success(function(user){
console.log('user =>' + user.username + ' stored');
})
.error(function(err){
console.log('error ====>', err);
})
| 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.username + ' stored');
})
.error(function(err){
console.log('error ====>', err);
})
db.User
.build({
username: 'janedoe',
email: 'janedoe@tessel.io',
name: 'Jane Doe',
password: 'password',
passwordConfirmation: 'password'
})
.confirmPassword()
.digest()
.genApiKey()
.save()
.success(function(user){
console.log('user =>' + user.username + ' stored');
})
.error(function(err){
console.log('error ====>', err);
})
| 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',
+ passwordConfirmation: 'password'
})
+ .confirmPassword()
.digest()
.genApiKey()
.save() |
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.colorBackground,
height: '100%',
width: 300,
position: 'absolute',
top: 0,
right: 0,
},
webview: {
height: '100%',
},
});
@injectSheet(styles) @observer
class TodosWebview extends Component {
static propTypes = {
classes: PropTypes.object.isRequired,
authToken: PropTypes.string.isRequired,
};
render() {
const { authToken, classes } = this.props;
return (
<div className={classes.root}>
<Webview
className={classes.webview}
src={`${environment.TODOS_FRONTEND}?authToken=${authToken}`}
/>
</div>
);
}
}
export default TodosWebview;
| 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.colorBackground,
height: '100%',
width: 300,
position: 'absolute',
top: 0,
right: -300,
},
webview: {
height: '100%',
},
});
@injectSheet(styles) @observer
class TodosWebview extends Component {
static propTypes = {
classes: PropTypes.object.isRequired,
authToken: PropTypes.string.isRequired,
};
render() {
const { authToken, classes } = this.props;
return (
<div className={classes.root}>
<Webview
className={classes.webview}
src={`${environment.TODOS_FRONTEND}?authToken=${authToken}`}
/>
</div>
);
}
}
export default TodosWebview;
| 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(value) {
if (value === null) {
return this._name;
}
this._name = value;
return this;
}
model(value = null) {
if (value === null) {
return this._model;
}
this._model = value;
this._bindModel();
this._set({
changed: false,
name: this._name,
value: value.get(this._name)
});
return this;
}
format(value = null) {
if (value === null) {
return this._format;
}
this._format = value;
return this;
}
value(itemValue = null) {
if (itemValue === null) {
return this._value;
}
this._value = itemValue;
return this;
}
_bindModel() {
if (this._model) {
this._model.setMaxListeners(this._model.getMaxListeners() + 1);
this._model.addListener('set', this._handleSet);
}
}
_unbindModel() {
if (this._model) {
this._model.setMaxListeners(this._model.getMaxListeners() - 1);
this._model.removeListener('set', this._handleSet);
}
}
_set() {}
}
| 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(value) {
if (value === null) {
return this._name;
}
this._name = value;
return this;
}
model(value = null) {
if (value === null) {
return this._model;
}
this._model = value;
this._bindModel();
setTimeout(() => {
this._set({
changed: false,
name: this._name,
value: value.get(this._name)
});
});
return this;
}
format(value = null) {
if (value === null) {
return this._format;
}
this._format = value;
return this;
}
value(itemValue = null) {
if (itemValue === null) {
return this._value;
}
this._value = itemValue;
return this;
}
_bindModel() {
if (this._model) {
this._model.setMaxListeners(this._model.getMaxListeners() + 1);
this._model.addListener('set', this._handleSet);
}
}
_unbindModel() {
if (this._model) {
this._model.setMaxListeners(this._model.getMaxListeners() - 1);
this._model.removeListener('set', this._handleSet);
}
}
_set() {}
}
| 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)
+ });
});
return this; |
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, .archive-overview h4');
anchors.remove('.comment header > h4');
// Smooth scrolling links in comments
$('.comment_reply').click(function(e) {
var $el = $(this);
var target, replyTo;
target = '#reply';
replyTo = $el.attr("id").replace(/serendipity_reply_/g, "");
$("#serendipity_replyTo").val(replyTo);
$('html, body').animate({
scrollTop: $(target).offset().top
}, 250);
e.preventDefault();
});
// Move comment preview
$('#c').insertAfter('#feedback');
})(jQuery);
| (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, .archive-overview h4');
anchors.remove('.comment header > h4');
// Smooth scrolling links in comments
$('.comment_reply').click(function(e) {
var $el = $(this);
var target, replyTo;
target = '#reply';
replyTo = $el.attr("id").replace(/serendipity_reply_/g, "");
$("#serendipity_replyTo").val(replyTo);
$('html, body').animate({
scrollTop: $(target).offset().top
}, 250);
e.preventDefault();
});
// Move comment preview
$('#c').insertAfter('#feedback');
})(jQuery);
| 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.setSize( container.offsetWidth, container.offsetHeight );
};
window.addEventListener( 'resize', updateSize, false );
updateSize();
return renderer;
} );
| 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.setSize( container.offsetWidth, container.offsetHeight );
// For a smoother render double the pixel ratio
renderer.setPixelRatio( 2 );
};
window.addEventListener( 'resize', updateSize, false );
updateSize();
return renderer;
} );
| 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.notify = callback; break;
case 'newgame': this.newGame = callback; break;
case 'quitgame': this.quitGame = callback; break;
case 'pausegame': this.pauseGame = callback; break;
}
}
InputManager.prototype.listen = function() {
document.addEventListener('keydown', this.keyHandler.bind(this));
}
InputManager.prototype.keyHandler = function(e) {
switch(e.keyCode) {
case this.km.LEFT:
case this.km.RIGHT:
case this.km.DOWN:
case this.km.DROP:
case this.km.RTURN:
case this.km.LTURN:
this.notify(e.keyCode);
break;
case this.km.NEW:
this.newGame();
break;
case this.km.QUIT:
this.quitGame();
break;
case this.km.PAUSE:
this.pauseGame();
break;
}
}
| 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 captured */
InputManager.prototype.register = function(event, callback) {
switch(event) {
case 'action': this.notify = callback; break;
case 'newgame': this.newGame = callback; break;
case 'quitgame': this.quitGame = callback; break;
case 'pausegame': this.pauseGame = callback; break;
}
}
/* Register the event filter with the browser */
InputManager.prototype.listen = function() {
document.addEventListener('keydown', this.keyHandler.bind(this));
}
/* The filter to use to get only game-related events */
InputManager.prototype.keyHandler = function(e) {
switch(e.keyCode) {
case this.km.LEFT:
case this.km.RIGHT:
case this.km.DOWN:
case this.km.DROP:
case this.km.RTURN:
case this.km.LTURN:
this.notify(e.keyCode);
break;
case this.km.NEW:
this.newGame();
break;
case this.km.QUIT:
this.quitGame();
break;
case this.km.PAUSE:
this.pauseGame();
break;
}
}
| 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) {
switch(event) {
case 'action': this.notify = callback; break;
@@ -22,10 +24,12 @@
}
}
+/* Register the event filter with the browser */
InputManager.prototype.listen = function() {
document.addEventListener('keydown', this.keyHandler.bind(this));
}
+/* The filter to use to get only game-related events */
InputManager.prototype.keyHandler = function(e) {
switch(e.keyCode) {
case this.km.LEFT: |
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" +
"kbt5EoayQ5SYOoJBYRYAYlJl2RetUeDMpSvh" +
"e9DaQr0HKHan0B9ptVyoLvOqpekiOmEqUJ6H" +
"ZKuIoma0pvqkkKDU9GPv",
"token_url": "o/token/",
"reset_url": "o/reset_token"
}
};
setts.CREDZ.token_url = setts.SERVER_URL + setts.CREDZ.token_url;
setts.CREDZ.reset_url = setts.SERVER_URL + setts.CREDZ.reset_url;
window.MFL_SETTINGS = setts;
})(window);
| (function (window) {
"use strict";
var setts = {
"SERVER_URL": "http://localhost:8061/",
"CREDZ": {
"client_id": "5O1KlpwBb96ANWe27ZQOpbWSF4DZDm4sOytwdzGv",
"client_secret": "PqV0dHbkjXAtJYhY9UOCgRVi5BzLhiDxGU91" +
"kbt5EoayQ5SYOoJBYRYAYlJl2RetUeDMpSvh" +
"e9DaQr0HKHan0B9ptVyoLvOqpekiOmEqUJ6H" +
"ZKuIoma0pvqkkKDU9GPv",
"token_url": "o/token/",
"revoke_url": "o/revoke_token"
}
};
setts.CREDZ.token_url = setts.SERVER_URL + setts.CREDZ.token_url;
setts.CREDZ.revoke_url = setts.SERVER_URL + setts.CREDZ.revoke_url;
window.MFL_SETTINGS = setts;
})(window);
| 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.token_url = setts.SERVER_URL + setts.CREDZ.token_url;
- setts.CREDZ.reset_url = setts.SERVER_URL + setts.CREDZ.reset_url;
+ setts.CREDZ.revoke_url = setts.SERVER_URL + setts.CREDZ.revoke_url;
window.MFL_SETTINGS = setts;
|
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) return done(err);
done();
})
});
it('should not create a user with the unique email', function(done) {
var user = new User({
email: 'test@gmail.com',
password: 'password'
});
user.save(function(err) {
if (err) err.code.should.equal(11000);
done();
});
});
it('should find user by email', function(done) {
User.findOne({ email: 'test@gmail.com' }, function(err, user) {
if (err) return done(err);
user.email.should.equal('test@gmail.com');
done();
});
});
it('should delete a user', function(done) {
User.remove({ email: 'test@gmail.com' }, function(err) {
if (err) return done(err);
done();
});
});
});
| 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) return done(err);
done();
});
});
it('should not create a user with the unique email', function(done) {
var user = new User({
email: 'test@gmail.com',
password: 'password'
});
user.save(function(err) {
if (err) err.code.should.equal(11000);
done();
});
});
it('should find user by email', function(done) {
User.findOne({ email: 'test@gmail.com' }, function(err, user) {
if (err) return done(err);
user.email.should.equal('test@gmail.com');
done();
});
});
it('should delete a user', function(done) {
User.remove({ email: 'test@gmail.com' }, function(err) {
if (err) return done(err);
done();
});
});
});
| 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-starter,dborncamp/shuttles,ajijohn/brainprinter,colleenDunlap/PlayingOnInternet,dafyddPrys/contingency,gurneyman/riToolkit,HappyGenes/HappyGenes,colleenDunlap/Lake-Map,MikeMichel/hackathon-starter,IsaacHardy/HOCO-FF-APP,pvijeh/node-express-mongo-api,colleenDunlap/PlayingOnInternet,ReadingPlus/flog,mackness/Routemetrics,Yixuan-Angela/hackathon-starter,EvelynSun/fcc-vote1,mostley/backstab,dborncamp/shuttles,sahat/hackathon-starter,mostley/backstab,shareonbazaar/bazaar,CahalKearney/node-boilerplate,CodeJockey1337/frameworks_project4,ak-zul/hackathon-starter,sahat/hackathon-starter,devneel/spitsomebars,nwhacks2016-travelRecommendation/travel-app,crystalrood/piggie,ericmreid/pingypong,awarn/cashier-analytics,baby03201/hackathon-starter,respectus/indel,vymarkov/hackathon-starter,tendermario/binners-project,bowdenk7/express-typescript-starter,awarn/cashier-analytics,erood/weight_tracker_app,MikeMichel/hackathon-starter,itsmomito/gitfood,itsmomito/gitfood,peterblazejewicz/hackathon-starter,devneel/spitsomebars,erood/creepy_ghost,stepheljobs/tentacool,webschoolfactory/tp-2019,CAYdenberg/wikode,colleenDunlap/PlayingOnInternet,respectus/indel,KareemG/cirqulate,webschoolfactory/tp-2019,awarn/bitcoins-trader,stenio123/ai-hackathon,peterblazejewicz/hackathon-starter,shareonbazaar/bazaar,jakeki/futista_node,JessedeGit/vegtable,shareonbazaar/bazaar,pvijeh/node-express-mongo-api,Torone/toro-starter,ahng1996/balloon-fight,colleenDunlap/Lake-Map,erood/creepy_ghost,uptownhr/lolgames,BlueAccords/vr-cinema,mrwolfyu/meteo-bbb,teogenesmoura/SoftwareEng12016,Yixuan-Angela/hackathon-starter,crystalrood/piggie,ajijohn/brainprinter,mrwolfyu/meteo-bbb,JessedeGit/vegtable,jakeki/futista_node,bewest/samedrop-collector,nwhacks2016-travelRecommendation/travel-app,hect1c/front-end-test,bewest/samedrop-collector,cwesno/app_for_us,EvelynSun/fcc-vote1,gurneyman/riToolkit,wfpc92/cleansuit-backend,vymarkov/hackathon-starter,ak-zul/hackathon-starter,KareemG/cirqulate,CodeJockey1337/frameworks_project4,uptownhr/lolgames,IsaacHardy/HOCO-FF-APP,bowdenk7/express-typescript-starter,flashsnake-so/hackathon-starter,peterblazejewicz/hackathon-starter,ajijohn/brainprinter,Carlosreyesk/boards-api,nehiljain/rhime,crystalrood/piggie,HappyGenes/HappyGenes,ch4tml/fcc-voting-app,hect1c/front-end-test,flashsnake-so/hackathon-starter,bowdenk7/express-typescript-starter,mackness/Routemetrics,cwesno/app_for_us,niallobrien/hackathon-starter-plus,stenio123/ai-hackathon,niallobrien/hackathon-starter-plus,CahalKearney/node-boilerplate,OperationSpark/Hackathon-Angel,CAYdenberg/wikode,tendermario/binners-project,sahat/hackathon-starter,OperationSpark/Hackathon-Angel,colleenDunlap/Lake-Map,erood/weight_tracker_app,LucienBrule/carpool,ajijohn/brainprinter,webschoolfactory/tp-2019,ericmreid/pingypong,BlueAccords/vr-cinema,caofb/hackathon-starter,wfpc92/cleansuit-backend,ahng1996/balloon-fight,Carlosreyesk/boards-api | ---
+++
@@ -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: 'scribunto-console',
title: 'Module:Sandbox/CLI',
clear: true
};
function call( err, info, next, data ) {
if ( err ) {
console.error( err );
} else if ( data.type === 'error' ) {
console.error( data.message );
} else {
console.log( data.print );
}
}
function cli( input ) {
params.question = input;
client.api.call( params, call );
}
function session( err, data ) {
params.content = data;
console.log( c.green( '* The module exports are available as the variable "p", including unsaved modifications.' ) );
console.log( c.green( '* Precede a line with "=" to evaluate it as an expression, or use print().' ) );
console.log( c.green( '* Use mw.log() in module code to send messages to this console.' ) );
rl.on( 'line', cli );
}
fs.readFile( 'helloworld.lua', session );
| 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: 'scribunto-console',
title: 'Module:Sandbox/CLI',
clear: true
};
function call( err, info, next, data ) {
if ( err ) {
console.error( err );
} else if ( data.type === 'error' ) {
console.error( data.message );
} else {
console.log( data.print );
}
}
function cli( input ) {
params.question = input;
client.api.call( params, call );
}
function session( err, data ) {
params.content = data;
console.log( c.green( '* The module exports are available as the variable "p", including unsaved modifications.' ) );
console.log( c.green( '* Precede a line with "=" to evaluate it as an expression, or use print().' ) );
console.log( c.green( '* Use mw.log() in module code to send messages to this console.' ) );
rl.on( 'line', cli );
}
fs.readFile( 'helloworld.lua', 'utf8', session );
| 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: {
extensions: [
'',
'.js',
'.jsx',
],
},
module: {
loaders,
},
externals: [
{
react: {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react',
},
}, {
'react-dom': {
root: 'ReactDOM',
commonjs2: 'react-dom',
commonjs: 'react-dom',
amd: 'react-dom',
},
}, {
'react-intl': {
root: 'ReactIntl',
commonjs2: 'react-intl',
commonjs: 'react-intl',
amd: 'react-intl',
},
},
],
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.DedupePlugin(),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
},
}),
],
};
| 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: {
extensions: [
'',
'.js',
'.jsx',
],
},
module: {
loaders,
},
externals: {
react: 'React',
'react-dom': 'ReactDOM',
'react-intl': 'ReactIntl',
'nordnet-ui-kit': 'NordnetUiKit',
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.DedupePlugin(),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
},
}),
],
};
| 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',
- commonjs: 'react-dom',
- amd: 'react-dom',
- },
- }, {
- 'react-intl': {
- root: 'ReactIntl',
- commonjs2: 'react-intl',
- commonjs: 'react-intl',
- amd: 'react-intl',
- },
- },
- ],
+ externals: {
+ react: 'React',
+ 'react-dom': 'ReactDOM',
+ 'react-intl': 'ReactIntl',
+ 'nordnet-ui-kit': 'NordnetUiKit',
+ },
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.DedupePlugin(), |
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, function (index, collection) {
html += transformCollection(collection);
});
html += "</DL><p>";
return html;
}
function addHeader() {
var html = "<!DOCTYPE NETSCAPE-Bookmark-file-1>";
html += "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\">";
html += "<TITLE>Linky Bookmarks</TITLE>";
html += "<H1>Linky Bookmarks</H1>"
return html;
}
function transformCollection(collection) {
var html = "<DT><H3>" + collection.text + "</H3>";
html += "<DL><p>";
$.each(collection.bookmarks, function (index, bookmark) {
html += "<DT><A HREF=\""+ bookmark.url + "\" ICON=\"default\">" + bookmark.text + "</A>";
});
$.each(collection.nodes, function (index, node) {
transformCollection(html, node);
});
html += "</DL><p>";
return html;
} | 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, function (index, collection) {
html += transformCollection(collection);
});
html += "</DL><p>";
return html;
}
function addHeader() {
var html = "<!DOCTYPE NETSCAPE-Bookmark-file-1>";
html += "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\">";
html += "<TITLE>Linky Bookmarks</TITLE>";
html += "<H1>Linky Bookmarks</H1>"
return html;
}
function transformCollection(collection) {
var html = "<DT><H3>" + collection.text + "</H3>";
html += "<DL><p>";
$.each(collection.bookmarks, function (index, bookmark) {
html += "<DT><A HREF=\""+ bookmark.url + "\" ICON=\"default\">" + bookmark.text + "</A>";
});
$.each(collection.nodes, function (index, node) {
html += transformCollection(node);
});
html += "</DL><p>";
return html;
} | 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 files
// need to be handled separately eventually
if (params.conf) {
return confPath + params.conf + '.json';
} else if (params.conf_file) {
return params.conf_file;
} else {
return confPath + 'default.json';
}
};
});
| "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 to conf files
// need to be handled separately eventually
if (params.conf) {
return confPath + params.conf + '.json';
} else if (params.conf_file) {
return params.conf_file;
} else {
if (useDefault) {
return confPath + 'default.json';
}
}
};
});
| 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/';
@@ -13,7 +13,9 @@
} else if (params.conf_file) {
return params.conf_file;
} else {
- return confPath + 'default.json';
+ if (useDefault) {
+ return confPath + 'default.json';
+ }
}
};
}); |
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: function () {
var clone = new Text(this.nodeValue);
clone._buffer = this._buffer;
return clone;
}
});
Object.defineProperty(Text.prototype, "nodeValue", {
get: function() {
return this._nodeValue;
},
set: function(value) {
this._nodeValue = value;
this._triggerChange();
}
});
module.exports = Text;
| 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 ) ) : this._nodeValue;
},
/**
*/
cloneNode: function () {
var clone = new Text(this.nodeValue);
clone._buffer = this._buffer;
return clone;
}
});
Object.defineProperty(Text.prototype, "nodeValue", {
get: function() {
return this._nodeValue;
},
set: function(value) {
this._nodeValue = value;
this._encode = true;
this._triggerChange();
}
});
module.exports = Text;
| 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 ) ? he.encode( String( this._nodeValue ) ) : this._nodeValue;
},
/**
@@ -35,6 +36,7 @@
},
set: function(value) {
this._nodeValue = value;
+ this._encode = true;
this._triggerChange();
}
}); |
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: 'Slider' },
{ name: 'Menu' },
{ name: 'Views', type: 'separator' },
{ name: 'List' },
{ name: 'Form' },
{ name: 'Calendar' },
{ type: 'separator' },
{ name: 'ripple' }
]
}
export default options
| '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: 'Slider' },
{ name: 'Menu' },
{ name: 'Views', type: 'divider' },
{ name: 'List' },
{ name: 'Form' },
{ name: 'Calendar' },
{ type: 'divider' },
{ name: 'ripple' }
]
}
export default options
| 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: 'Slider' },
{ name: 'Menu' },
- { name: 'Views', type: 'separator' },
+ { name: 'Views', type: 'divider' },
{ name: 'List' },
{ name: 'Form' },
{ name: 'Calendar' },
- { type: 'separator' },
+ { type: 'divider' },
{ name: 'ripple' }
]
} |
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.querySelector('.js-markdown-editor-content'),
classActive = 'is-active',
htmlEditorNode;
if(!markdownEditorContentNode) return;
markdownEditorContentNode.value = markdownEditorContentNode.value.split("\n").map(function(e) { return e.trim() }).join("\n");
masEditor.init({
editorContainer: document.querySelector('.l-editor'),
cmsFormNode: document.querySelector('#edit_page') || document.querySelector('#new_page'),
toolbarNode: document.querySelector('.js-toolbar'),
htmlEditorNode: document.querySelector('.js-html-editor'),
htmlEditorContentNode: document.querySelector('.js-html-editor-content'),
markdownEditorNode: document.querySelector('.js-markdown-editor'),
markdownEditorContentNode: markdownEditorContentNode,
switchModeButtonNodes: document.querySelectorAll('.js-switch-mode'),
classActive : 'is-active'
});
});
};
| // 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.querySelector('.js-markdown-editor-content'),
classActive = 'is-active',
htmlEditorNode;
'use strict';
if(!markdownEditorContentNode) return;
markdownEditorContentNode.value = markdownEditorContentNode.value.split("\n").map(function(e) { return e.trim() }).join("\n");
masEditor.init({
editorContainer: document.querySelector('.l-editor'),
cmsFormNode: document.querySelector('#edit_page') || document.querySelector('#new_page'),
toolbarNode: document.querySelector('.js-toolbar'),
htmlEditorNode: document.querySelector('.js-html-editor'),
htmlEditorContentNode: document.querySelector('.js-html-editor-content'),
markdownEditorNode: document.querySelector('.js-markdown-editor'),
markdownEditorContentNode: markdownEditorContentNode,
switchModeButtonNodes: document.querySelectorAll('.js-switch-mode'),
classActive : 'is-active'
});
});
};
| 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"]
};
packager(packagerOptions, function done_callback (err, appPaths) {
if(err) {
console.log(err);
}
}); | 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"
},
"ignore": ["msi", "setup", ".idea"]
};
packager(packagerOptions, function done_callback (err, appPaths) {
if(err) {
console.log(err);
}
}); | 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(200).send('logged in');
});
})(req, res, next);
}
};
| 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(200).send('logged in');
});
})(req, res, next);
}
};
| 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 next(err); }
return res.status(200).send('logged in'); |
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({
html: `<head>
<meta name="defaultLanguage" content="en">
<meta name="availableLanguages" content="en">
<link rel="localization" href="../test/fixtures/{locale}.properties">
</head>
<body>
${content}
</body>`,
scripts: [
'scripts/l10n.js',
require.resolve('mutationobserver-shim')
],
url: 'file://' + path.resolve(dirname, "../../assets") + "/",
created(err, window) {
global.localStorage = new Storage(null);
global.window = window;
window.localStorage = localStorage;
window.addEventListener("error", (e) => console.error(e.error));
},
done(err, window) {
if(err) {
reject(err);
}
else {
global.Event = window.Event;
global.CustomEvent = window.CustomEvent;
global.document = window.document;
global.navigator = window.navigator;
global.Element = window.Element;
window.navigator.mozL10n.ready(resolve);
}
},
features: {
FetchExternalResources: [ "script", "link" ],
ProcessExternalResources: [ "script" ]
},
virtualConsole
});
});
};
| 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">
<meta name="availableLanguages" content="en">
<link rel="localization" href="../test/fixtures/{locale}.properties">
</head>
<body>
${content}
</body>`, {
url: 'file://' + path.resolve(dirname, "../../assets") + "/",
resources: "usable",
runScripts: "dangerously"
});
global.localStorage = new Storage(null);
global.window = env.window;
env.window.localStorage = localStorage;
env.window.addEventListener("error", (e) => console.error(e.error));
global.Event = env.window.Event;
global.CustomEvent = env.window.CustomEvent;
global.document = env.window.document;
global.navigator = env.window.navigator;
global.Element = env.window.Element;
global.XMLHttpRequest = env.window.XMLHttpRequest;
require("mutationobserver-shim");
global.MutationObserver = env.window.MutationObserver;
require("../../assets/scripts/l10n");
env.window.navigator.mozL10n.ready(resolve);
});
};
| 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 = "") => {
- return new Promise((resolve, reject) => {
- env({
- html: `<head>
- <meta name="defaultLanguage" content="en">
- <meta name="availableLanguages" content="en">
- <link rel="localization" href="../test/fixtures/{locale}.properties">
-</head>
-<body>
- ${content}
-</body>`,
- scripts: [
- 'scripts/l10n.js',
- require.resolve('mutationobserver-shim')
- ],
+ return new Promise((resolve) => {
+ const env = new JSDOM(`<head>
+ <meta name="defaultLanguage" content="en">
+ <meta name="availableLanguages" content="en">
+ <link rel="localization" href="../test/fixtures/{locale}.properties">
+ </head>
+ <body>
+ ${content}
+ </body>`, {
url: 'file://' + path.resolve(dirname, "../../assets") + "/",
- created(err, window) {
- global.localStorage = new Storage(null);
- global.window = window;
- window.localStorage = localStorage;
- window.addEventListener("error", (e) => console.error(e.error));
- },
- done(err, window) {
- if(err) {
- reject(err);
- }
- else {
- global.Event = window.Event;
- global.CustomEvent = window.CustomEvent;
- global.document = window.document;
- global.navigator = window.navigator;
- global.Element = window.Element;
- window.navigator.mozL10n.ready(resolve);
- }
- },
- features: {
- FetchExternalResources: [ "script", "link" ],
- ProcessExternalResources: [ "script" ]
- },
- virtualConsole
+ resources: "usable",
+ runScripts: "dangerously"
});
+ global.localStorage = new Storage(null);
+ global.window = env.window;
+ env.window.localStorage = localStorage;
+ env.window.addEventListener("error", (e) => console.error(e.error));
+ global.Event = env.window.Event;
+ global.CustomEvent = env.window.CustomEvent;
+ global.document = env.window.document;
+ global.navigator = env.window.navigator;
+ global.Element = env.window.Element;
+ global.XMLHttpRequest = env.window.XMLHttpRequest;
+ require("mutationobserver-shim");
+ global.MutationObserver = env.window.MutationObserver;
+ require("../../assets/scripts/l10n");
+ env.window.navigator.mozL10n.ready(resolve);
});
}; |
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
},
colors: ['#2222ff', '#ff2222']
});
$('#container').highcharts({
chart: {
defaultSeriesType: 'spline',
zoomType: 'x'
},
data: {
csv: data
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: {
month: '%b %e',
year: '%b'
},
title: {
text: 'Date'
}
},
yAxis: {
title: {
text: "Weight (lbs)"
}
},
plotOptions: {
series: {
shadow: true,
connectNulls: true,
marker: {
enabled: false
}
}
},
title: {
text: "Weight (lbs) vs. Time"
},
subtitle: {
text: null
}
});
});
});
| $(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').highcharts({
chart: {
defaultSeriesType: 'spline',
zoomType: 'x'
},
data: {
csv: data
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: {
month: '%b %e',
year: '%b'
},
title: {
text: 'Date'
}
},
yAxis: {
title: {
text: "Weight (lbs)"
}
},
plotOptions: {
series: {
shadow: true,
connectNulls: true,
marker: {
enabled: false
}
}
},
title: {
text: "Weight (lbs) vs. Time"
},
subtitle: {
text: null
}
});
});
});
| 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'
},
plugins: isProd ? [ new webpack.optimize.UglifyJsPlugin() ] : [],
externals: {
"jquery": "jQuery"
}
}
}
module.exports = generate(false)
module.exports.generate = generate | 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'
},
plugins: isProd ? [ new webpack.optimize.UglifyJsPlugin() ] : [],
externals: {
jquery: {
commonjs: 'jquery',
amd: 'jquery',
root: 'jQuery'
}
}
}
}
module.exports = generate(false)
module.exports.generate = generate | 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 = createSagaMiddleware()
let middlewares = [thunk, sagaMiddleware]
if (__DEV__) {
const createLogger = require('redux-logger')
const logger = createLogger({
level: 'debug'
})
middlewares.push(logger)
}
const configureStore = () => {
const persistedState = getLocalStorage()
const store = createStore(
rootReducer,
persistedState,
compose(
applyMiddleware(...middlewares),
window.devToolsExtension ? window.devToolsExtension() : f => f
)
)
store.subscribe(throttle(() => {
setLocalStorage({
name: store.getState().name,
count: store.getState().count
})
}, 1000))
return store
}
export default configureStore
| 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 = createSagaMiddleware()
let middlewares = [thunk, sagaMiddleware]
if (__DEV__) {
const createLogger = require('redux-logger')
const logger = createLogger({
level: 'debug'
})
middlewares.push(logger)
}
const configureStore = () => {
const persistedState = getLocalStorage()
const store = createStore(
rootReducer,
persistedState,
compose(
applyMiddleware(...middlewares),
window.devToolsExtension ? window.devToolsExtension() : f => f
)
)
store.subscribe(throttle(() => {
setLocalStorage({
name: store.getState().name,
count: store.getState().count
})
}, 1000))
return store
}
export default configureStore
| 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 = createSagaMiddleware()
let middlewares = [thunk, sagaMiddleware] |
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', { path: '/projects/:project_id'});
this.route('userLogin', { path: '/users/login' });
this.route('registration', { path: '/users/sign_up' });
this.route("fourOhFour", { path: "*path"});
});
Sis.Router.reopen({
location: 'history'
});
| // 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('registration', { path: '/users/sign_up' });
this.route("fourOhFour", { path: "*path"});
});
Sis.Router.reopen({
location: 'history'
});
| 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'});
this.route('project', { path: '/projects/:project_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[currentPath]) {
getOwner(this).lookup(`controller:${route.name}`).set('styleNamespace', podNames[currentPath]);
classes.push(podNames[currentPath]);
}
}
getOwner(this).lookup('controller:application').set('routeStyleNamespaceClassSet', classes.join(' '));
}
});
export function initialize() {}
export default {
name: 'route-styles',
initialize
};
| 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.name.replace(/\./g, '/');
if (podNames[currentPath]) {
getOwner(this).lookup(`controller:${route.name}`).set('styleNamespace', podNames[currentPath]);
classes.push(podNames[currentPath]);
}
}
getOwner(this).lookup('controller:application').set('routeStyleNamespaceClassSet', classes.join(' '));
}
});
export function initialize() {}
export default {
name: 'route-styles',
initialize
};
| 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 *********************************************************************************/
rowThumbnails.addEventListener("click", moeRedirect, false);
function moeRedirect(event) {
var target = event.target;
var notImage = target.className !== 'thumbnail-image';
if(notImage) return;
var pageId = target.getAttribute('data-page-id');
window.location.href = context + '/page/' + pageId;
}
var thumbnails = window.document.querySelectorAll('.thumbnail');
var tallestThumbnailSize = 0;
thumbnails.forEach(function(value, key, listObj, argument) {
var offsetHeight = listObj[key].offsetHeight;
if(offsetHeight > tallestThumbnailSize) tallestThumbnailSize = offsetHeight;
});
thumbnails.forEach(function(value, key, listObj, argument) {
listObj[key].setAttribute('style','height:' + tallestThumbnailSize + 'px');
}); | /* Cached Variables *******************************************************************************/
var context = sessionStorage.getItem('context');
var rowThumbnails = document.querySelector('.row-thumbnails');
/* Initialization *********************************************************************************/
rowThumbnails.addEventListener("click", moeRedirect, false);
function moeRedirect(event) {
var target = event.target;
var notImage = target.className !== 'thumbnail-image';
if(notImage) return;
var pageId = target.getAttribute('data-page-id');
window.location.href = context + '/page/' + pageId;
}
var thumbnails = window.document.querySelectorAll('.thumbnail');
var tallestThumbnailSize = 0;
thumbnails.forEach(function(value, key, listObj, argument) {
var offsetHeight = listObj[key].offsetHeight;
if(offsetHeight > tallestThumbnailSize) tallestThumbnailSize = offsetHeight;
});
thumbnails.forEach(function(value, key, listObj, argument) {
listObj[key].setAttribute('style','min-height:' + tallestThumbnailSize + 'px');
}); | 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 options with these defaults.
var options = this.options({
force: false
});
grunt.verbose.writeflags(options, 'Options');
// Clean specified files / dirs.
this.filesSrc.forEach(function(filepath) {
grunt.log.write('Cleaning "' + filepath + '"...');
try {
grunt.file.delete(filepath, options);
grunt.log.ok();
} catch (e) {
grunt.log.error();
grunt.verbose.error(e);
grunt.fail.warn('Clean operation failed.');
}
});
});
};
| /*
* 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 options with these defaults.
var options = this.options({
force: false
});
grunt.verbose.writeflags(options, 'Options');
// Clean specified files / dirs.
this.filesSrc.forEach(function(filepath) {
if (!grunt.file.exists(filepath)) { return; }
grunt.log.write('Cleaning "' + filepath + '"...');
try {
grunt.file.delete(filepath, options);
grunt.log.ok();
} catch (e) {
grunt.log.error();
grunt.verbose.error(e);
grunt.fail.warn('Clean operation failed.');
}
});
});
};
| 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',
'test/mock/**/*.js',
'test/spec/**/*.js'
];
// list of files to exclude
exclude = [];
// test results reporter to use
// possible values: dots || progress
reporter = 'progress';
// web server port
port = 8080;
// cli runner port
runnerPort = 9100;
// enable / disable colors in the output (reporters and logs)
colors = true;
// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel = LOG_INFO;
// enable / disable watching file and executing tests whenever any file changes
autoWatch = false;
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari
// - PhantomJS
browsers = ['Chrome'];
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun = false;
| // 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',
'test/mock/**/*.js',
'test/spec/**/*.js'
];
// list of files to exclude
exclude = [];
// test results reporter to use
// possible values: dots || progress
reporter = 'progress';
// web server port
port = 8080;
// cli runner port
runnerPort = 9100;
// enable / disable colors in the output (reporters and logs)
colors = true;
// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel = LOG_INFO;
// enable / disable watching file and executing tests whenever any file changes
autoWatch = false;
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari
// - PhantomJS
browsers = ['Chrome'];
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun = false;
| 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(__dirname, '..');
childProcess
.exec('npm run build:module', { cwd: rootDir })
.on('exit', exitCode => {
expect(exitCode).to.equal(0);
const ctor = require(path.resolve(rootDir, package.main));
expect(ctor).to.be.a('function');
done();
});
});
});
| 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.resolve(__dirname, '..');
childProcess
.exec('npm run build:module', { cwd: rootDir })
.on('exit', function (exitCode) {
expect(exitCode).to.equal(0);
const ctor = require(path.resolve(rootDir, package.main));
expect(ctor).to.be.a('function');
done();
});
});
});
| 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, '..');
childProcess
.exec('npm run build:module', { cwd: rootDir })
- .on('exit', exitCode => {
+ .on('exit', function (exitCode) {
expect(exitCode).to.equal(0);
const ctor = require(path.resolve(rootDir, package.main)); |
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) {
assert.ok('data' in e);
assert.equal(e.data.bar, 'foo');
assert.equal(e.data.bunkle, 'baz');
w.terminate();
};
w.postMessage({'foo' : 'bar', 'baz' : 'bunkle'});
| // 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.onmessage = function(e) {
assert.ok('data' in e);
assert.equal(e.data.bar, 'foo');
assert.equal(e.data.bunkle, 'baz');
receivedMsg = true;
w.terminate();
};
w.postMessage({'foo' : 'bar', 'baz' : 'bunkle'});
process.addListener('exit', function() {
assert.equal(receivedMsg, true);
});
| 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');
+ receivedMsg = true;
+
w.terminate();
};
w.postMessage({'foo' : 'bar', 'baz' : 'bunkle'});
+
+process.addListener('exit', function() {
+ assert.equal(receivedMsg, true);
+}); |
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('displays a welcome message', () => {
render(<Component/>, node, () => {
expect(node.innerHTML).toContain('Welcome to React components')
})
})
})
| 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('displays no ribbon data found', () => {
render(<Component/>, node, () => {
expect(node.innerHTML).toContain('No ribbon data found')
})
})
})
| 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 ribbon data found')
})
})
}) |
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 protocol+"://"+host+":"+port+"/";
};
return fullApiUrl();
})
| 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 = function() {
return protocol+"://"+host+":"+port+"/";
};
return fullApiUrl();
})
| 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 || $location.protocol();
+ var host = process.env.API_HOST || $location.host();
+ var port = process.env.API_PORT || $location.port();
var fullApiUrl = function() {
return protocol+"://"+host+":"+port+"/";
}; |
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');
});
this.resource('items', {path: ':group_id/items'}, function () {
this.resource('item', {path: ':group_id/items/:item_id'}, function () {
this.route('edit');
});
});
});
});
return Router;
});
| 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 exclusively shown on screen.
// also for clarity.
this.resource('group', {path: ':group_id'}, function () {
this.route('edit');
});
this.resource('items', {path: ':group_id/items'}, function () {
this.resource('item', {path: ':item_id'}, function () {
this.route('edit');
});
});
});
});
return Router;
});
| 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', {path: ':group_id'}, function () {
this.route('edit');
});
+
this.resource('items', {path: ':group_id/items'}, function () {
- this.resource('item', {path: ':group_id/items/:item_id'}, function () {
+ this.resource('item', {path: ':item_id'}, function () {
this.route('edit');
});
}); |
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,yajinni/WoWAnalyzer,fyruna/WoWAnalyzer,ronaldpereira/WoWAnalyzer,hasseboulen/WoWAnalyzer,Juko8/WoWAnalyzer,sMteX/WoWAnalyzer,enragednuke/WoWAnalyzer,anom0ly/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,Juko8/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,yajinni/WoWAnalyzer,fyruna/WoWAnalyzer,ronaldpereira/WoWAnalyzer,sMteX/WoWAnalyzer,anom0ly/WoWAnalyzer,FaideWW/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', ['$q', '$ocLazyLoad', 'futureState', function($q, $ocLazyLoad, futureState) {
var def = $q.defer();
System.import(futureState.src).then(loaded => {
var newModule = loaded;
if (!loaded.name) {
var key = Object.keys(loaded);
newModule = loaded[key[0]];
}
$ocLazyLoad.load(newModule).then(function() {
def.resolve();
}, function() {
console.log('error loading: ' + loaded.name);
});
});
return def.promise;
}]);
futureRoutes.forEach(function(r) {
$futureStateProvider.futureState(r);
});
}];
return RouterConfig;
};
export default routing;
| 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', ['$q', '$ocLazyLoad', 'futureState', function($q, $ocLazyLoad, futureState) {
var def = $q.defer();
System.import(futureState.src).then(loaded => {
var newModule = loaded;
if (!loaded.name) {
var key = Object.keys(loaded);
newModule = loaded[key[1]];
}
$ocLazyLoad.load(newModule).then(function() {
def.resolve();
}, function() {
console.log('error loading: ' + loaded.name);
});
});
return def.promise;
}]);
futureRoutes.forEach(function(r) {
$futureStateProvider.futureState(r);
});
}];
return RouterConfig;
};
export default routing;
| 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,
expenses: 0
};
calculate() {
const { income, expenses } = this.state;
const taxInfo = TaxCalculator.getTaxInfo(income, expenses);
this.props.handleUpdate(taxInfo);
}
render() {
return (
<Card>
<CardContent>
<div>
<TextField
label="Income"
type="number"
value={this.state.income}
onChange={event => this.setState({ income: event.target.value })}
margin="normal"
style={{ width: '100%' }}
/>
</div>
<div>
<TextField
label="Expenses"
type="number"
value={this.state.expenses}
onChange={event =>
this.setState({ expenses: event.target.value })}
margin="normal"
style={{ width: '100%' }}
/>
</div>
</CardContent>
<CardActions>
<Button onClick={() => this.calculate()}>Calculate</Button>
</CardActions>
</Card>
);
}
}
export default TextFields;
| 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,
expenses: 0
};
calculate() {
const { income, expenses } = this.state;
const taxInfo = TaxCalculator.getTaxInfo(income, expenses);
this.props.handleUpdate(taxInfo);
}
render() {
return (
<Card>
<CardContent>
<div>
<TextField
label="Income"
type="number"
value={this.state.income}
onChange={event => this.setState({ income: event.target.value })}
inputProps={{ step: '10000' }}
margin="normal"
style={{ width: '100%' }}
/>
</div>
<div>
<TextField
label="Expenses"
type="number"
value={this.state.expenses}
onChange={event =>
this.setState({ expenses: event.target.value })}
inputProps={{ step: '10000' }}
margin="normal"
style={{ width: '100%' }}
/>
</div>
</CardContent>
<CardActions>
<Button onClick={() => this.calculate()}>Calculate</Button>
</CardActions>
</Card>
);
}
}
export default TextFields;
| 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,6 +39,7 @@
value={this.state.expenses}
onChange={event =>
this.setState({ expenses: event.target.value })}
+ inputProps={{ step: '10000' }}
margin="normal"
style={{ width: '100%' }}
/> |
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 = new Bank();
describe(bank.name.acronym, () => {
it('Should not equal null', () => {
const testPromise = new Promise((resolve) => {
bank.scrape((rates) => {
resolve(rates);
});
});
return testPromise.then((result) => {
expect(result).to.not.equal(null);
});
});
});
});
});
| 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 = new Bank();
describe(bank.name.acronym, () => {
const bankTestPromise = new Promise((resolve) => {
bank.scrape((rates) => {
resolve(rates);
});
});
it('Should not equal null', () => {
return bankTestPromise.then((result) => {
expect(result).to.not.equal(null);
});
});
});
});
});
| 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', () => {
- const testPromise = new Promise((resolve) => {
- bank.scrape((rates) => {
- resolve(rates);
- });
- });
-
- return testPromise.then((result) => {
+ return bankTestPromise.then((result) => {
expect(result).to.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').version,
extraModules: [],
force: true,
types: ['prod', 'optional'],
});
}
}
async function run() {
shell.cd('npm-package');
shell.exec('yarn');
shell.cd('-');
await rebuildModules(path.resolve(__dirname, '..'));
shell.cd('dist');
shell.exec('yarn');
await rebuildModules(path.resolve(__dirname, '../dist'));
shell.rm(
'-rf',
'node_modules/*/{example,examples,test,tests,*.md,*.markdown,CHANGELOG*,.*,Makefile}'
);
// eslint-disable-next-line
require('./patch-modules');
}
run();
| 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').version,
extraModules: [],
force: true,
types: ['prod', 'optional'],
});
}
}
async function run() {
shell.cd('npm-package');
shell.exec('yarn');
shell.cd('-');
await rebuildModules(path.resolve(__dirname, '..'));
shell.cd('dist');
shell.exec('yarn');
await rebuildModules(path.resolve(__dirname, '../dist'));
shell.rm(
'-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}'
);
// eslint-disable-next-line
require('./patch-modules');
}
run();
| 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}'
+ );
// eslint-disable-next-line
require('./patch-modules');
} |
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 queryStateCallback = function(state) {
logger('State: ' + state);
};
chrome.idle.queryState(detectionIntervalInSeconds, queryStateCallback);
});
// TODO(maxw): Allow the detection interval to be set in a textbox.
addButton('Change detection interval to 10 seconds', function() {
chrome.idle.setDetectionInterval(10);
logger('Detection interval set to 10 seconds.');
});
addButton('Change detection interval to 60 seconds', function() {
chrome.idle.setDetectionInterval(60);
logger('Detection interval set to 60 seconds.');
});
// Add a status-change listener.
var stateListener = function(state) {
logger('State changed: ' + state);
};
chrome.idle.onStateChanged.addListener(stateListener);
};
| // 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 queryStateCallback = function(state) {
console.log('State: ' + state);
};
chrome.idle.queryState(detectionIntervalInSeconds, queryStateCallback);
});
// TODO(maxw): Allow the detection interval to be set in a textbox.
addButton('Change detection interval to 10 seconds', function() {
chrome.idle.setDetectionInterval(10);
console.log('Detection interval set to 10 seconds.');
});
addButton('Change detection interval to 60 seconds', function() {
chrome.idle.setDetectionInterval(60);
console.log('Detection interval set to 60 seconds.');
});
// Add a status-change listener.
var stateListener = function(state) {
console.log('State changed: ' + state);
};
chrome.idle.onStateChanged.addListener(stateListener);
};
| 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);
});
@@ -14,17 +14,17 @@
// TODO(maxw): Allow the detection interval to be set in a textbox.
addButton('Change detection interval to 10 seconds', function() {
chrome.idle.setDetectionInterval(10);
- logger('Detection interval set to 10 seconds.');
+ console.log('Detection interval set to 10 seconds.');
});
addButton('Change detection interval to 60 seconds', function() {
chrome.idle.setDetectionInterval(60);
- logger('Detection interval set to 60 seconds.');
+ console.log('Detection interval set to 60 seconds.');
});
// Add a status-change listener.
var stateListener = function(state) {
- logger('State changed: ' + state);
+ console.log('State changed: ' + state);
};
chrome.idle.onStateChanged.addListener(stateListener);
}; |
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 {
args = template.data.buttonMethodArgs;
}
Meteor.apply(template.data.buttonMethod, args, function(error, result) {
$(event.target).button('reset').prop('disabled', false);;
if (error) {
$('#error-modal').modal();
console.log(error)
Session.set('call-button-error', error.message)
} else {
if (typeof template.data.buttonOnSuccess === "function") {
template.data.buttonOnSuccess(result);
}
}
});
}
});
Template.callButton.helpers({
style: function() {
return this.buttonStyle?this.buttonStyle:'success'
}
});
| 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) {
if(template.data.buttonMethodArgs.match(/\(\)$/)) {
args = [eval(template.data.buttonMethodArgs)];
} else {
args = template.data.buttonMethodArgs;
}
} else {
args = template.data.buttonMethodArgs;
}
Meteor.apply(template.data.buttonMethod, args, function(error, result) {
$(event.target).button('reset').prop('disabled', false);;
if (error) {
$('#error-modal').modal();
console.log(error)
Session.set('call-button-error', error.message)
} else {
if (typeof template.data.buttonOnSuccess === "function") {
template.data.buttonOnSuccess(result);
}
}
});
}
});
Template.callButton.helpers({
style: function() {
return this.buttonStyle?this.buttonStyle:'success'
}
});
| 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.buttonMethodArgs instanceof String) {
+ if(template.data.buttonMethodArgs.match(/\(\)$/)) {
+ args = [eval(template.data.buttonMethodArgs)];
+ } else {
+ args = template.data.buttonMethodArgs;
+ }
} else {
args = template.data.buttonMethodArgs;
} |
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 propTypes = {
rolePermissions: PropTypes.instanceOf(Immutable.Map).isRequired,
headers: PropTypes.array.isRequired
}
getRows = () => {
const { rolePermissions } = this.props;
const rows = [];
if (rolePermissions) {
rolePermissions.keySeq().forEach((role) => {
let permissionsStr = rolePermissions.get(role).join(', ');
let roleStr = role;
if (role === AUTHENTICATED_USER) {
roleStr = 'Default for all users*';
permissionsStr = 'None';
}
rows.push(
<tr className={`${styles.mainRow} roleRow`} key={role}>
<td>{roleStr}</td>
<td>{permissionsStr}</td>
</tr>
);
});
}
return rows;
}
render() {
const headers = [];
this.props.headers.forEach((header) => {
headers.push(<th key={header}>{header}</th>);
});
return (
<Table bordered responsive className={styles.table}>
<thead>
<tr>
{headers}
</tr>
</thead>
<tbody>
{this.getRows()}
</tbody>
</Table>
);
}
}
| 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 propTypes = {
rolePermissions: PropTypes.instanceOf(Immutable.Map).isRequired,
headers: PropTypes.array.isRequired
}
getRows = () => {
const { rolePermissions } = this.props;
const rows = [];
if (rolePermissions) {
rolePermissions.keySeq().forEach((role) => {
let permissionsStr = rolePermissions.get(role).join(', ');
let roleStr = role;
if (role === AUTHENTICATED_USER) {
roleStr = 'OpenLattice User Role - Default for all users*';
permissionsStr = 'None';
}
rows.push(
<tr className={`${styles.mainRow} roleRow`} key={role}>
<td>{roleStr}</td>
<td>{permissionsStr}</td>
</tr>
);
});
}
return rows;
}
render() {
const headers = [];
this.props.headers.forEach((header) => {
headers.push(<th key={header}>{header}</th>);
});
return (
<Table bordered responsive className={styles.table}>
<thead>
<tr>
{headers}
</tr>
</thead>
<tbody>
{this.getRows()}
</tbody>
</Table>
);
}
}
| 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;
metadata.location_is_approximate = false;
} else if (metadata.google_maps_coordinates_approximate) {
coordinates = metadata.google_maps_coordinates_approximate;
metadata.location_is_approximate = true;
}
if (coordinates) {
coordinates = coordinates.split(',').map(parseFloat);
if (coordinates.length >= 2) {
metadata.latitude = coordinates[0];
metadata.longitude = coordinates[1];
} else {
throw new Error('Encountered unexpected coordinate format.');
}
}
return metadata;
};
| '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;
metadata.location_is_approximate = false;
} else if (metadata.google_maps_coordinates_approximate) {
coordinates = metadata.google_maps_coordinates_approximate;
metadata.location_is_approximate = true;
}
if (coordinates) {
coordinates = coordinates.split(',').map(parseFloat);
if (coordinates.length >= 2) {
metadata.latitude = coordinates[0];
metadata.longitude = coordinates[1];
} else {
throw new Error('Encountered unexpected coordinate format.');
}
}
// Index into
if (metadata.latitude && metadata.longitude) {
metadata.location = {
"lat": metadata.latitude,
"lon": metadata.longitude
}
}
return metadata;
};
| 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
}
console.warn(
"-".repeat(40) + "\n" +
"Builded sources not found. It looks like you might be attempting " +
`to install ${ pkg.name } from git. ` +
"Sources need to be transpiled before use and this will require you to " +
`have babel-cli installed as well as ${ pkg.babel.presets }.\n` +
"-".repeat(40) + "\n" +
"TL;DR;\n" +
"Type this command\n" +
"npm install babel-core babel-cli " + pkg.babel.presets.join(" ") +
" && npm rebuild statinamic"
)
var installer = spawn("npm", [ "run", "transpile" ], {
stdio: "inherit",
cwd: join(__dirname, "../"),
})
installer.on("error", function(err) {
console.error(`Failed to build ${ pkg.name } automatically. `)
console.error(err)
})
})
| 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(
"\n" +
"Builded sources not found. It looks like you might be attempting " +
`to install ${ pkg.name } from git. \n` +
"Sources need to be transpiled before use. This may take a moment." +
"\n"
)
const spawnOpts = {
stdio: "inherit",
cwd: join(__dirname, "../"),
}
const fail = (err) => {
console.error(`Failed to build ${ pkg.name } automatically. `)
if (err) {
throw err
}
}
const installTranspiler = spawn(
"npm",
[ "i" , "babel-core", "babel-cli", ...pkg.babel.presets ],
spawnOpts
)
installTranspiler.on("error", fail)
installTranspiler.on("close", (code) => {
if (code === 0) {
const installer = spawn(
"npm",
[ "run", "transpile" ],
spawnOpts
)
installer.on("error", fail)
}
})
})
| 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
+const pkg = require("../package.json")
console.log(pkg.name, "post-install", process.cwd())
@@ -13,26 +11,42 @@
}
console.warn(
- "-".repeat(40) + "\n" +
+ "\n" +
"Builded sources not found. It looks like you might be attempting " +
- `to install ${ pkg.name } from git. ` +
- "Sources need to be transpiled before use and this will require you to " +
- `have babel-cli installed as well as ${ pkg.babel.presets }.\n` +
- "-".repeat(40) + "\n" +
- "TL;DR;\n" +
- "Type this command\n" +
- "npm install babel-core babel-cli " + pkg.babel.presets.join(" ") +
- " && npm rebuild statinamic"
+ `to install ${ pkg.name } from git. \n` +
+ "Sources need to be transpiled before use. This may take a moment." +
+ "\n"
)
- var installer = spawn("npm", [ "run", "transpile" ], {
+ const spawnOpts = {
stdio: "inherit",
cwd: join(__dirname, "../"),
- })
+ }
- installer.on("error", function(err) {
+ const fail = (err) => {
console.error(`Failed to build ${ pkg.name } automatically. `)
- console.error(err)
+ if (err) {
+ throw err
+ }
+ }
+
+ const installTranspiler = spawn(
+ "npm",
+ [ "i" , "babel-core", "babel-cli", ...pkg.babel.presets ],
+ spawnOpts
+ )
+
+ installTranspiler.on("error", fail)
+ installTranspiler.on("close", (code) => {
+ if (code === 0) {
+ const installer = spawn(
+ "npm",
+ [ "run", "transpile" ],
+ spawnOpts
+ )
+
+ installer.on("error", fail)
+ }
})
}) |
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.
*
* @providesModule symbolicateStackTrace
* @flow
*/
'use strict';
const {fetch} = require('fetch');
const getDevServer = require('getDevServer');
import type {StackFrame} from 'parseErrorStack';
async function symbolicateStackTrace(stack: Array<StackFrame>): Promise<Array<StackFrame>> {
const devServer = getDevServer();
if (!devServer.bundleLoadedFromServer) {
throw new Error('Bundle was not loaded from the packager');
}
const response = await fetch(devServer.url + 'symbolicate', {
method: 'POST',
body: JSON.stringify({stack}),
});
const json = await response.json();
return json.stack;
}
module.exports = symbolicateStackTrace;
| /**
* 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.
*
* @providesModule symbolicateStackTrace
* @flow
*/
'use strict';
const {fetch} = require('fetch');
const getDevServer = require('getDevServer');
const {SourceCode} = require('NativeModules');
import type {StackFrame} from 'parseErrorStack';
async function symbolicateStackTrace(stack: Array<StackFrame>): Promise<Array<StackFrame>> {
const devServer = getDevServer();
if (!devServer.bundleLoadedFromServer) {
throw new Error('Bundle was not loaded from the packager');
}
if (SourceCode.scriptURL) {
for (let i = 0; i < stack.length; ++i) {
// If the sources exist on disk rather than appearing to come from the packager,
// replace the location with the packager URL until we reach an internal source
// which does not have a path (no slashes), indicating a switch from within
// the application to a surrounding debugging environment.
if (/^http/.test(stack[i].file) || !/[\\/]/.test(stack[i].file)) {
break;
}
stack[i].file = SourceCode.scriptURL;
}
}
const response = await fetch(devServer.url + 'symbolicate', {
method: 'POST',
body: JSON.stringify({stack}),
});
const json = await response.json();
return json.stack;
}
module.exports = symbolicateStackTrace;
| 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 to handle them.
Since all the application JS will be part of a bundle file, we can switch out the path to the bundle on the filesystem with paths to the bundle served by the packager, and things will work just as though it was debugging in chrome. We stop the replacement once we reach an internal module (`vm.js` in the case of both nucleide and VSCode) since that is the point when the execution switches from inside the app to the surrounding debugging environment.
I've verified that this fixes redbox stack trace symbolication in VSCode, and from my understanding of nucleide's debugging environment it should also work there without requiring any changes.
Closes https://github.com/facebook/react-native/pull/9906
Differential Revision: D3887166
Pulled By: davidaurelio
fbshipit-source-id: e3a6704f30e0fd045ad836bba51f6e20d9854c30
| 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-native,mironiasty/react-native,htc2u/react-native,negativetwelve/react-native,shrutic/react-native,imDangerous/react-native,javache/react-native,Ehesp/react-native,kesha-antonov/react-native,jaggs6/react-native,CodeLinkIO/react-native,arthuralee/react-native,thotegowda/react-native,dikaiosune/react-native,tsjing/react-native,makadaw/react-native,aljs/react-native,htc2u/react-native,skevy/react-native,ankitsinghania94/react-native,makadaw/react-native,shrutic/react-native,jevakallio/react-native,gilesvangruisen/react-native,jadbox/react-native,frantic/react-native,kesha-antonov/react-native,htc2u/react-native,facebook/react-native,hoangpham95/react-native,Livyli/react-native,janicduplessis/react-native,shrutic123/react-native,jevakallio/react-native,kesha-antonov/react-native,Swaagie/react-native,ptmt/react-native-macos,xiayz/react-native,gilesvangruisen/react-native,mironiasty/react-native,charlesvinette/react-native,Ehesp/react-native,ankitsinghania94/react-native,naoufal/react-native,tszajna0/react-native,rickbeerendonk/react-native,forcedotcom/react-native,charlesvinette/react-native,farazs/react-native,alin23/react-native,jaggs6/react-native,ndejesus1227/react-native,imjerrybao/react-native,aaron-goshine/react-native,Livyli/react-native,hammerandchisel/react-native,jasonnoahchoi/react-native,hammerandchisel/react-native,satya164/react-native,clozr/react-native,exponentjs/react-native,Bhullnatik/react-native,ptomasroos/react-native,thotegowda/react-native,tadeuzagallo/react-native,farazs/react-native,tsjing/react-native,xiayz/react-native,Bhullnatik/react-native,csatf/react-native,exponent/react-native,imDangerous/react-native,mironiasty/react-native,dikaiosune/react-native,brentvatne/react-native,christopherdro/react-native,tsjing/react-native,imDangerous/react-native,dikaiosune/react-native,thotegowda/react-native,cosmith/react-native,jevakallio/react-native,alin23/react-native,hammerandchisel/react-native,imDangerous/react-native,ndejesus1227/react-native,peterp/react-native,callstack-io/react-native,salanki/react-native,ptomasroos/react-native,foghina/react-native,happypancake/react-native,Purii/react-native,cdlewis/react-native,ptmt/react-native-macos,Livyli/react-native,csatf/react-native,csatf/react-native,shrutic123/react-native,callstack-io/react-native,shrutic/react-native,csatf/react-native,alin23/react-native,facebook/react-native,CodeLinkIO/react-native,gilesvangruisen/react-native,chnfeeeeeef/react-native,cpunion/react-native,alin23/react-native,jadbox/react-native,shrutic123/react-native,PlexChat/react-native,javache/react-native,cosmith/react-native,chnfeeeeeef/react-native,Swaagie/react-native,imDangerous/react-native,brentvatne/react-native,formatlos/react-native,csatf/react-native,PlexChat/react-native,jadbox/react-native,skevy/react-native,cosmith/react-native,foghina/react-native,jaggs6/react-native,negativetwelve/react-native,christopherdro/react-native,Livyli/react-native,nickhudkins/react-native,adamjmcgrath/react-native,javache/react-native,charlesvinette/react-native,jadbox/react-native,nickhudkins/react-native,aaron-goshine/react-native,xiayz/react-native,esauter5/react-native,myntra/react-native,pandiaraj44/react-native,hoastoolshop/react-native,salanki/react-native,Bhullnatik/react-native,imDangerous/react-native,rickbeerendonk/react-native,clozr/react-native,imjerrybao/react-native,ptomasroos/react-native,janicduplessis/react-native,ankitsinghania94/react-native,gilesvangruisen/react-native,DannyvanderJagt/react-native,brentvatne/react-native,brentvatne/react-native,DanielMSchmidt/react-native,brentvatne/react-native,callstack-io/react-native,formatlos/react-native,myntra/react-native,Guardiannw/react-native,Maxwell2022/react-native,exponent/react-native,hoangpham95/react-native,tgoldenberg/react-native,chnfeeeeeef/react-native,negativetwelve/react-native,jadbox/react-native,naoufal/react-native,kesha-antonov/react-native,aljs/react-native,Livyli/react-native,Livyli/react-native,gitim/react-native,nickhudkins/react-native,DanielMSchmidt/react-native,clozr/react-native,orenklein/react-native,ptmt/react-native-macos,nickhudkins/react-native,janicduplessis/react-native,formatlos/react-native,christopherdro/react-native,makadaw/react-native,cdlewis/react-native,aljs/react-native,imjerrybao/react-native,tgoldenberg/react-native,brentvatne/react-native,tadeuzagallo/react-native,tadeuzagallo/react-native,mironiasty/react-native,Bhullnatik/react-native,gre/react-native,Maxwell2022/react-native,imjerrybao/react-native,formatlos/react-native,ptmt/react-native-macos,clozr/react-native,hoastoolshop/react-native,tszajna0/react-native,Maxwell2022/react-native,htc2u/react-native,DanielMSchmidt/react-native,xiayz/react-native,Guardiannw/react-native,DanielMSchmidt/react-native,hoastoolshop/react-native,Purii/react-native,rickbeerendonk/react-native,cosmith/react-native,Bhullnatik/react-native,imjerrybao/react-native,farazs/react-native,christopherdro/react-native,gilesvangruisen/react-native,tszajna0/react-native,ndejesus1227/react-native,negativetwelve/react-native,nickhudkins/react-native,christopherdro/react-native,peterp/react-native,CodeLinkIO/react-native,clozr/react-native,rickbeerendonk/react-native,chnfeeeeeef/react-native,Livyli/react-native,chnfeeeeeef/react-native,arthuralee/react-native,skevy/react-native,gre/react-native,naoufal/react-native,makadaw/react-native,DannyvanderJagt/react-native,thotegowda/react-native,hammerandchisel/react-native,shrutic/react-native,aljs/react-native,skevy/react-native,dikaiosune/react-native,skevy/react-native,doochik/react-native,naoufal/react-native,CodeLinkIO/react-native,Swaagie/react-native,Purii/react-native,satya164/react-native,salanki/react-native,charlesvinette/react-native,ptmt/react-native-macos,mironiasty/react-native,DannyvanderJagt/react-native,charlesvinette/react-native,hammerandchisel/react-native,DanielMSchmidt/react-native,htc2u/react-native,eduardinni/react-native,naoufal/react-native,tsjing/react-native,lprhodes/react-native,myntra/react-native,gilesvangruisen/react-native,cdlewis/react-native,Ehesp/react-native,DannyvanderJagt/react-native,myntra/react-native,exponent/react-native,farazs/react-native,cdlewis/react-native,makadaw/react-native,happypancake/react-native,alin23/react-native,naoufal/react-native,csatf/react-native,nickhudkins/react-native,hammerandchisel/react-native,Andreyco/react-native,CodeLinkIO/react-native,doochik/react-native,exponent/react-native,salanki/react-native,ndejesus1227/react-native,peterp/react-native,Andreyco/react-native,satya164/react-native,pandiaraj44/react-native,cpunion/react-native,christopherdro/react-native,cdlewis/react-native,exponent/react-native,farazs/react-native,tadeuzagallo/react-native,esauter5/react-native,Andreyco/react-native,jevakallio/react-native,alin23/react-native,hammerandchisel/react-native,cdlewis/react-native,esauter5/react-native,eduardinni/react-native,aaron-goshine/react-native,exponent/react-native,naoufal/react-native,orenklein/react-native,forcedotcom/react-native,doochik/react-native,cosmith/react-native,cpunion/react-native,DannyvanderJagt/react-native,janicduplessis/react-native,Guardiannw/react-native,jaggs6/react-native,satya164/react-native,Purii/react-native,orenklein/react-native,hoastoolshop/react-native,ankitsinghania94/react-native,Andreyco/react-native,Maxwell2022/react-native,lprhodes/react-native,shrutic/react-native,csatf/react-native,javache/react-native,rickbeerendonk/react-native,callstack-io/react-native,lprhodes/react-native,kesha-antonov/react-native,cpunion/react-native,Ehesp/react-native,doochik/react-native,shrutic/react-native,arthuralee/react-native,mironiasty/react-native,esauter5/react-native,DanielMSchmidt/react-native,orenklein/react-native,cpunion/react-native,cdlewis/react-native,Andreyco/react-native,tsjing/react-native,tszajna0/react-native,jevakallio/react-native,adamjmcgrath/react-native,Ehesp/react-native,mironiasty/react-native,gre/react-native,janicduplessis/react-native,formatlos/react-native,tadeuzagallo/react-native,frantic/react-native,Andreyco/react-native,ptomasroos/react-native,tadeuzagallo/react-native,frantic/react-native,mironiasty/react-native,clozr/react-native,doochik/react-native,hoangpham95/react-native,peterp/react-native,CodeLinkIO/react-native,Guardiannw/react-native,Swaagie/react-native,jevakallio/react-native,shrutic123/react-native,cdlewis/react-native,aaron-goshine/react-native,charlesvinette/react-native,aaron-goshine/react-native,tsjing/react-native,htc2u/react-native,facebook/react-native,hoangpham95/react-native,Purii/react-native,pandiaraj44/react-native,salanki/react-native,imjerrybao/react-native,tszajna0/react-native,tgoldenberg/react-native,aaron-goshine/react-native,dikaiosune/react-native,exponentjs/react-native,doochik/react-native,satya164/react-native,jadbox/react-native,orenklein/react-native,exponentjs/react-native,gre/react-native,ankitsinghania94/react-native,formatlos/react-native,pandiaraj44/react-native,skevy/react-native,charlesvinette/react-native,exponent/react-native,charlesvinette/react-native,xiayz/react-native,aaron-goshine/react-native,adamjmcgrath/react-native,farazs/react-native,eduardinni/react-native,clozr/react-native,hoastoolshop/react-native,tadeuzagallo/react-native,naoufal/react-native,DannyvanderJagt/react-native,foghina/react-native,forcedotcom/react-native,forcedotcom/react-native,Maxwell2022/react-native,nickhudkins/react-native,ptomasroos/react-native,shrutic/react-native,dikaiosune/react-native,tszajna0/react-native,Purii/react-native,alin23/react-native,Ehesp/react-native,Swaagie/react-native,hoastoolshop/react-native,salanki/react-native,PlexChat/react-native,pandiaraj44/react-native,gitim/react-native,christopherdro/react-native,peterp/react-native,Swaagie/react-native,Bhullnatik/react-native,Swaagie/react-native,DannyvanderJagt/react-native,eduardinni/react-native,skevy/react-native,thotegowda/react-native,hoangpham95/react-native,tszajna0/react-native,Guardiannw/react-native,negativetwelve/react-native,tgoldenberg/react-native,makadaw/react-native,esauter5/react-native,facebook/react-native,Purii/react-native,farazs/react-native,tszajna0/react-native,rickbeerendonk/react-native,doochik/react-native,Maxwell2022/react-native,peterp/react-native,lprhodes/react-native,brentvatne/react-native,Andreyco/react-native,arthuralee/react-native,Bhullnatik/react-native,imDangerous/react-native,gre/react-native,foghina/react-native,forcedotcom/react-native,pandiaraj44/react-native,Maxwell2022/react-native,facebook/react-native,imDangerous/react-native,facebook/react-native,exponent/react-native,myntra/react-native,tgoldenberg/react-native,Livyli/react-native,formatlos/react-native,PlexChat/react-native,frantic/react-native,gilesvangruisen/react-native,shrutic123/react-native,jasonnoahchoi/react-native,forcedotcom/react-native,alin23/react-native,PlexChat/react-native,gilesvangruisen/react-native,peterp/react-native,ptmt/react-native-macos,callstack-io/react-native,chnfeeeeeef/react-native,DannyvanderJagt/react-native,jaggs6/react-native,esauter5/react-native,farazs/react-native,tgoldenberg/react-native,formatlos/react-native,gre/react-native,happypancake/react-native,kesha-antonov/react-native,htc2u/react-native,exponentjs/react-native,exponentjs/react-native,imjerrybao/react-native,gitim/react-native,christopherdro/react-native,cosmith/react-native,myntra/react-native,tsjing/react-native,hammerandchisel/react-native,clozr/react-native,facebook/react-native,cosmith/react-native,jasonnoahchoi/react-native,dikaiosune/react-native,forcedotcom/react-native,DanielMSchmidt/react-native,thotegowda/react-native,javache/react-native,jasonnoahchoi/react-native,adamjmcgrath/react-native,facebook/react-native,doochik/react-native,PlexChat/react-native,ptomasroos/react-native,csatf/react-native,brentvatne/react-native,hoangpham95/react-native,shrutic/react-native,skevy/react-native,ndejesus1227/react-native,makadaw/react-native,farazs/react-native,kesha-antonov/react-native,tsjing/react-native,myntra/react-native,exponentjs/react-native,happypancake/react-native,javache/react-native,aaron-goshine/react-native,ptomasroos/react-native,janicduplessis/react-native,CodeLinkIO/react-native,cosmith/react-native,eduardinni/react-native,esauter5/react-native,jadbox/react-native,javache/react-native,happypancake/react-native,negativetwelve/react-native,foghina/react-native,gitim/react-native,rickbeerendonk/react-native,cpunion/react-native,foghina/react-native,happypancake/react-native,chnfeeeeeef/react-native,Guardiannw/react-native,ankitsinghania94/react-native,gitim/react-native,DanielMSchmidt/react-native,ndejesus1227/react-native,xiayz/react-native,salanki/react-native,Andreyco/react-native,exponentjs/react-native,Maxwell2022/react-native,makadaw/react-native,facebook/react-native,exponentjs/react-native,myntra/react-native,tgoldenberg/react-native,Guardiannw/react-native,htc2u/react-native,satya164/react-native,peterp/react-native,hoangpham95/react-native,aljs/react-native,adamjmcgrath/react-native,satya164/react-native,foghina/react-native,negativetwelve/react-native,jaggs6/react-native,arthuralee/react-native,ptomasroos/react-native,tadeuzagallo/react-native,Guardiannw/react-native,jasonnoahchoi/react-native,imjerrybao/react-native,foghina/react-native,adamjmcgrath/react-native,callstack-io/react-native,salanki/react-native,happypancake/react-native,dikaiosune/react-native,rickbeerendonk/react-native,ndejesus1227/react-native,ndejesus1227/react-native,PlexChat/react-native,satya164/react-native,rickbeerendonk/react-native,jevakallio/react-native,jaggs6/react-native,negativetwelve/react-native,gitim/react-native,pandiaraj44/react-native,Ehesp/react-native,xiayz/react-native,PlexChat/react-native,cpunion/react-native,ptmt/react-native-macos,formatlos/react-native,thotegowda/react-native,lprhodes/react-native,shrutic123/react-native,aljs/react-native,gre/react-native,adamjmcgrath/react-native,callstack-io/react-native,lprhodes/react-native,Purii/react-native,pandiaraj44/react-native,hoangpham95/react-native,shrutic123/react-native,gitim/react-native,callstack-io/react-native,negativetwelve/react-native,kesha-antonov/react-native,eduardinni/react-native,janicduplessis/react-native,Ehesp/react-native,jevakallio/react-native,eduardinni/react-native,jasonnoahchoi/react-native,makadaw/react-native,hoastoolshop/react-native,esauter5/react-native,lprhodes/react-native,hoastoolshop/react-native,xiayz/react-native,gre/react-native,tgoldenberg/react-native,chnfeeeeeef/react-native,shrutic123/react-native,mironiasty/react-native,jasonnoahchoi/react-native,cdlewis/react-native,Swaagie/react-native,aljs/react-native,happypancake/react-native,orenklein/react-native,ankitsinghania94/react-native,javache/react-native,jaggs6/react-native,janicduplessis/react-native,doochik/react-native,jasonnoahchoi/react-native,gitim/react-native,thotegowda/react-native,javache/react-native,forcedotcom/react-native,nickhudkins/react-native,Bhullnatik/react-native,jevakallio/react-native,lprhodes/react-native | ---
+++
@@ -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 from the packager');
}
+ if (SourceCode.scriptURL) {
+ for (let i = 0; i < stack.length; ++i) {
+ // If the sources exist on disk rather than appearing to come from the packager,
+ // replace the location with the packager URL until we reach an internal source
+ // which does not have a path (no slashes), indicating a switch from within
+ // the application to a surrounding debugging environment.
+ if (/^http/.test(stack[i].file) || !/[\\/]/.test(stack[i].file)) {
+ break;
+ }
+ stack[i].file = SourceCode.scriptURL;
+ }
+ }
+
const response = await fetch(devServer.url + 'symbolicate', {
method: 'POST',
body: JSON.stringify({stack}), |
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.unsubscribe) { |
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.project = project;
ctrl.chooseTemplate = chooseTemplate;
ctrl.createSample = createSample;
/////////////////////////
function chooseTemplate() {
modalInstance.chooseTemplate(ctrl.project);
}
function createSample() {
var template = processTemplates.getTemplateByName('As Received');
processTemplates.setActiveTemplate(template);
$state.go('projects.project.processes.create');
}
}
}(angular.module('materialscommons')));
| (function (module) {
module.controller('ProjectHomeController', ProjectHomeController);
ProjectHomeController.$inject = ["project", "modalInstance", "templates", "$state"];
function ProjectHomeController(project, modalInstance, templates, $state) {
var ctrl = this;
ctrl.project = project;
ctrl.chooseTemplate = chooseTemplate;
ctrl.createSample = createSample;
/////////////////////////
function chooseTemplate() {
modalInstance.chooseTemplate(ctrl.project, templates).then(function(processTemplateName) {
$state.go('projects.project.processes.create', {process: processTemplateName});
});
}
function createSample() {
$state.go('projects.project.processes.create', {process: 'As Received'});
}
}
}(angular.module('materialscommons')));
| 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"];
- function ProjectHomeController(project, modalInstance, processTemplates, $state) {
+ function ProjectHomeController(project, modalInstance, templates, $state) {
var ctrl = this;
ctrl.project = project;
@@ -12,13 +12,13 @@
/////////////////////////
function chooseTemplate() {
- modalInstance.chooseTemplate(ctrl.project);
+ modalInstance.chooseTemplate(ctrl.project, templates).then(function(processTemplateName) {
+ $state.go('projects.project.processes.create', {process: processTemplateName});
+ });
}
function createSample() {
- var template = processTemplates.getTemplateByName('As Received');
- processTemplates.setActiveTemplate(template);
- $state.go('projects.project.processes.create');
+ $state.go('projects.project.processes.create', {process: 'As Received'});
}
}
}(angular.module('materialscommons'))); |
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 : 'Platform documentation',
description : 'Docs page helps you start using Hawk. Get token and connent your project right now.'
}
});
});
module.exports = router;
| '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 : 'Platform documentation',
description : 'Complete documentation on how to start using Hawk on your project.'
}
});
});
module.exports = router;
| 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,francisco-filho/Ghost,Azzurrio/Ghost,mtvillwock/Ghost,thinq4yourself/Unmistakable-Blog,olsio/Ghost,JulienBrks/Ghost,kaiqigong/Ghost,thomasalrin/Ghost,UnbounDev/Ghost,Klaudit/Ghost,thehogfather/Ghost,bigertech/Ghost,skmezanul/Ghost,GarrethDottin/Habits-Design,darvelo/Ghost,allspiritseve/mindlikewater,yangli1990/Ghost,jgillich/Ghost,katrotz/blog.katrotz.space,jomofrodo/ccb-ghost,cicorias/Ghost,flpms/ghost-ad,codeincarnate/Ghost,yangli1990/Ghost,cqricky/Ghost,cwonrails/Ghost,liftup/ghost,icowan/Ghost,axross/ghost,novaugust/Ghost,AileenCGN/Ghost,SkynetInc/steam,jiangjian-zh/Ghost,djensen47/Ghost,letsjustfixit/Ghost,ignasbernotas/nullifer,virtuallyearthed/Ghost,syaiful6/Ghost,sunh3/Ghost,phillipalexander/Ghost,cysys/ghost-openshift,Alxandr/Blog,liftup/ghost,madole/diverse-learners,Smile42RU/Ghost,neynah/GhostSS,GroupxDev/javaPress,zumobi/Ghost,omaracrystal/Ghost,Japh/shortcoffee,obsoleted/Ghost,Romdeau/Ghost,petersucks/blog,Smile42RU/Ghost,UsmanJ/Ghost,gcamana/Ghost,PeterCxy/Ghost,Japh/Ghost,zackslash/Ghost,pathayes/FoodBlog,PaulBGD/Ghost-Plus,tyrikio/Ghost,epicmiller/pages,kaiqigong/Ghost,freele/ghost,PDXIII/Ghost-FormMailer,anijap/PhotoGhost,Aaron1992/Ghost,fredeerock/atlabghost,dggr/Ghost-sr,memezilla/Ghost,Coding-House/Ghost,r14r/fork_nodejs_ghost,claudiordgz/Ghost,carlosmtx/Ghost,cicorias/Ghost,notno/Ghost,optikalefx/Ghost,novaugust/Ghost,mdbw/ghost,bastianbin/Ghost,Coding-House/Ghost,scopevale/wethepeopleweb.org,GarrethDottin/Habits-Design,allanjsx/Ghost,dai-shi/Ghost,lukekhamilton/Ghost,vishnuharidas/Ghost,weareleka/blog,mtvillwock/Ghost,bisoe/Ghost,riyadhalnur/Ghost,carlosmtx/Ghost,cysys/ghost-openshift,vainglori0us/urban-fortnight,dYale/blog,johngeorgewright/blog.j-g-w.info,lukaszklis/Ghost,telco2011/Ghost,NikolaiIvanov/Ghost,v3rt1go/Ghost,Elektro1776/javaPress,dYale/blog,davidmenger/nodejsfan,sfpgmr/Ghost,Loyalsoldier/Ghost,janvt/Ghost,STANAPO/Ghost,tyrikio/Ghost,trunk-studio/Ghost,BayPhillips/Ghost,riyadhalnur/Ghost,schneidmaster/theventriloquist.us,IbrahimAmin/Ghost,ManRueda/manrueda-blog,lanffy/Ghost,PaulBGD/Ghost-Plus,kaychaks/kaushikc.org,barbastan/Ghost,r1N0Xmk2/Ghost,ManRueda/Ghost,javorszky/Ghost,achimos/ghost_as,rmoorman/Ghost,lcamacho/Ghost,ghostchina/website,kortemy/Ghost,duyetdev/islab,mlabieniec/ghost-env,sajmoon/Ghost,BayPhillips/Ghost,load11/ghost,Trendy/Ghost,Kaenn/Ghost,NikolaiIvanov/Ghost,JohnONolan/Ghost,bbmepic/Ghost,rafaelstz/Ghost,gleneivey/Ghost,mohanambati/Ghost,obsoleted/Ghost,ClarkGH/Ghost,Sebastian1011/Ghost,cncodog/Ghost-zh-codog,PepijnSenders/whatsontheotherside,neynah/GhostSS,AlexKVal/Ghost,sergeylukin/Ghost,dymx101/Ghost,AnthonyCorrado/Ghost,ManRueda/manrueda-blog,manishchhabra/Ghost,kaychaks/kaushikc.org,Elektro1776/javaPress,TribeMedia/Ghost,Xibao-Lv/Ghost,camilodelvasto/localghost,cobbspur/Ghost,mttschltz/ghostblog,mhhf/ghost-latex,dymx101/Ghost,madole/diverse-learners,no1lov3sme/Ghost,Netazoic/bad-gateway,rchrd2/Ghost,jomofrodo/ccb-ghost,InnoD-WebTier/hardboiled_ghost,ManRueda/Ghost,panezhang/Ghost,tanbo800/Ghost,woodyrew/Ghost,ThorstenHans/Ghost,camilodelvasto/localghost,blankmaker/Ghost,ghostchina/Ghost.zh,situkangsayur/Ghost,laispace/laiblog,metadevfoundation/Ghost,uploadcare/uploadcare-ghost-demo,PepijnSenders/whatsontheotherside,carlyledavis/Ghost,skmezanul/Ghost,trunk-studio/Ghost,neynah/GhostSS,Feitianyuan/Ghost,bsansouci/Ghost,edurangel/Ghost,shrimpy/Ghost,ManRueda/manrueda-blog,Japh/Ghost,mattchupp/blog,darvelo/Ghost,exsodus3249/Ghost,ineitzke/Ghost,e10/Ghost,jiachenning/Ghost,Netazoic/bad-gateway,adam-paterson/blog,Alxandr/Blog,praveenscience/Ghost,netputer/Ghost,bosung90/Ghost,jparyani/GhostSS,javimolla/Ghost,ckousik/Ghost,claudiordgz/Ghost,r1N0Xmk2/Ghost,schematical/Ghost,ManRueda/Ghost,ghostchina/Ghost-zh,UnbounDev/Ghost,aschmoe/jesse-ghost-app,Kikobeats/Ghost,zackslash/Ghost,pensierinmusica/Ghost,arvidsvensson/Ghost,davidenq/Ghost-Blog,jacostag/Ghost,Netazoic/bad-gateway,benstoltz/Ghost,allanjsx/Ghost,disordinary/Ghost,JonathanZWhite/Ghost,tksander/Ghost,vloom/blog,wangjun/Ghost,kmeurer/GhostAzureSetup,Netazoic/bad-gateway,ladislas/ghost,denzelwamburu/denzel.xyz,ASwitlyk/Ghost,IbrahimAmin/Ghost,hnq90/Ghost,SachaG/bjjbot-blog,mlabieniec/ghost-env,kwangkim/Ghost,Feitianyuan/Ghost,theonlypat/Ghost,etanxing/Ghost,JonSmith/Ghost,nneko/Ghost,MrMaksimize/sdg1,tchapi/igneet-blog,klinker-apps/ghost,ghostchina/Ghost.zh,mayconxhh/Ghost,rchrd2/Ghost,diogogmt/Ghost,schneidmaster/theventriloquist.us,Klaudit/Ghost,shrimpy/Ghost,hnarayanan/narayanan.co,rizkyario/Ghost,GroupxDev/javaPress,tmp-reg/Ghost,kwangkim/Ghost,fredeerock/atlabghost,KnowLoading/Ghost,veyo-care/Ghost,rafaelstz/Ghost,Trendy/Ghost,bitjson/Ghost,veyo-care/Ghost,trepafi/ghost-base,pollbox/ghostblog,ljhsai/Ghost,ananthhh/Ghost,leonli/ghost,aschmoe/jesse-ghost-app,arvidsvensson/Ghost,woodyrew/Ghost,hilerchyn/Ghost,rollokb/Ghost,no1lov3sme/Ghost,ErisDS/Ghost,thinq4yourself/Unmistakable-Blog,nmukh/Ghost,syaiful6/Ghost,devleague/uber-hackathon,sebgie/Ghost,zhiyishou/Ghost,pollbox/ghostblog,NovaDevelopGroup/Academy,MadeOnMars/Ghost,ygbhf/Ghost,beautyOfProgram/Ghost,smaty1/Ghost,vainglori0us/urban-fortnight,chris-yoon90/Ghost,sankumsek/Ghost-ashram,v3rt1go/Ghost,dylanchernick/ghostblog,denzelwamburu/denzel.xyz,ygbhf/Ghost,beautyOfProgram/Ghost,javorszky/Ghost,kolorahl/Ghost,rito/Ghost,qdk0901/Ghost,jiangjian-zh/Ghost,DesenTao/Ghost,tandrewnichols/ghost,sangcu/Ghost,NovaDevelopGroup/Academy,nneko/Ghost,ivantedja/ghost,jaguerra/Ghost,wemakeweb/Ghost,wallmarkets/Ghost,ashishapy/ghostpy,llv22/Ghost,SachaG/bjjbot-blog,gcamana/Ghost,LeandroNascimento/Ghost,smedrano/Ghost,novaugust/Ghost,atandon/Ghost,ballPointPenguin/Ghost,hyokosdeveloper/Ghost,hnq90/Ghost,mnitchie/Ghost,allspiritseve/mindlikewater,patterncoder/patterncoder,ngosinafrica/SiteForNGOs,Polyrhythm/dolce,ErisDS/Ghost,akveo/akveo-blog,velimir0xff/Ghost,axross/ghost,omaracrystal/Ghost,bosung90/Ghost,yundt/seisenpenji,uploadcare/uploadcare-ghost-demo,andrewconnell/Ghost,francisco-filho/Ghost,DesenTao/Ghost,Brunation11/Ghost,jeonghwan-kim/Ghost,julianromera/Ghost,ITJesse/Ghost-zh,Gargol/Ghost,bisoe/Ghost,jin/Ghost,pathayes/FoodBlog,dqj/Ghost,lf2941270/Ghost,morficus/Ghost,telco2011/Ghost,duyetdev/islab,cqricky/Ghost,YY030913/Ghost,bbmepic/Ghost,Japh/shortcoffee,llv22/Ghost,karmakaze/Ghost,rameshponnada/Ghost,zeropaper/Ghost,johnnymitch/Ghost,JohnONolan/Ghost,KnowLoading/Ghost,greenboxindonesia/Ghost,LeandroNascimento/Ghost,VillainyStudios/Ghost,kevinansfield/Ghost,Jai-Chaudhary/Ghost,telco2011/Ghost,melissaroman/ghost-blog,TryGhost/Ghost,RufusMbugua/TheoryOfACoder,jiachenning/Ghost,mattchupp/blog,zhiyishou/Ghost,mikecastro26/ghost-custom,k2byew/Ghost,lowkeyfred/Ghost,mhhf/ghost-latex,ashishapy/ghostpy,delgermurun/Ghost,sergeylukin/Ghost,laispace/laiblog,qdk0901/Ghost,chris-yoon90/Ghost,tanbo800/Ghost,NovaDevelopGroup/Academy,melissaroman/ghost-blog,leninhasda/Ghost,dylanchernick/ghostblog,ineitzke/Ghost,mttschltz/ghostblog,influitive/crafters,phillipalexander/Ghost,lf2941270/Ghost,Jai-Chaudhary/Ghost,akveo/akveo-blog,MadeOnMars/Ghost,Kikobeats/Ghost,notno/Ghost,devleague/uber-hackathon,yundt/seisenpenji,pedroha/Ghost,GroupxDev/javaPress,daimaqiao/Ghost-Bridge,stridespace/Ghost,prosenjit-itobuz/Ghost,bitjson/Ghost,diancloud/Ghost,imjerrybao/Ghost,Kaenn/Ghost,memezilla/Ghost,Azzurrio/Ghost,ckousik/Ghost,leonli/ghost,NamedGod/Ghost,jacostag/Ghost,djensen47/Ghost,ericbenson/GhostAzureSetup,camilodelvasto/herokughost,dbalders/Ghost,tidyui/Ghost,benstoltz/Ghost,exsodus3249/Ghost,pedroha/Ghost,kortemy/Ghost,imjerrybao/Ghost,STANAPO/Ghost,ivanoats/ivanstorck.com,ivanoats/ivanstorck.com,FredericBernardo/Ghost,prosenjit-itobuz/Ghost,Xibao-Lv/Ghost,sajmoon/Ghost,anijap/PhotoGhost,skleung/blog,gleneivey/Ghost,olsio/Ghost,jgillich/Ghost,jaguerra/Ghost,lethalbrains/Ghost,panezhang/Ghost,praveenscience/Ghost,ananthhh/Ghost,psychobunny/Ghost,jamesslock/Ghost,jparyani/GhostSS,sebgie/Ghost,psychobunny/Ghost,AlexKVal/Ghost,lanffy/Ghost,ljhsai/Ghost,jaswilli/Ghost,davidmenger/nodejsfan,Remchi/Ghost,gabfssilva/Ghost,sceltoas/Ghost,gabfssilva/Ghost,rollokb/Ghost,Alxandr/Blog,klinker-apps/ghost,sifatsultan/js-ghost,sangcu/Ghost,ryansukale/ux.ryansukale.com,ASwitlyk/Ghost,patterncoder/patterncoder,rameshponnada/Ghost,barbastan/Ghost,handcode7/Ghost,flomotlik/Ghost,netputer/Ghost,greyhwndz/Ghost,jorgegilmoreira/ghost,etdev/blog,rizkyario/Ghost,JohnONolan/Ghost,xiongjungit/Ghost,camilodelvasto/herokughost,hoxoa/Ghost,InnoD-WebTier/hardboiled_ghost,smaty1/Ghost,ladislas/ghost,ballPointPenguin/Ghost,augbog/Ghost,load11/ghost,adam-paterson/blog,lukw00/Ghost,ryansukale/ux.ryansukale.com,weareleka/blog,leonli/ghost,daihuaye/Ghost,ddeveloperr/Ghost,etanxing/Ghost,kevinansfield/Ghost,dai-shi/Ghost,diancloud/Ghost,jamesslock/Ghost,sfpgmr/Ghost,patrickdbakke/ghost-spa,mnitchie/Ghost,wspandihai/Ghost,ryanbrunner/crafters,xiongjungit/Ghost,floofydoug/Ghost,ericbenson/GhostAzureSetup,kortemy/Ghost,uniqname/everydaydelicious,Kaenn/Ghost,RufusMbugua/TheoryOfACoder,sunh3/Ghost,greenboxindonesia/Ghost,edsadr/Ghost,eduardojmatos/eduardomatos.me,leninhasda/Ghost,carlyledavis/Ghost,JonSmith/Ghost,augbog/Ghost,dggr/Ghost-sr,metadevfoundation/Ghost,ITJesse/Ghost-zh,Sebastian1011/Ghost,Bunk/Ghost,edsadr/Ghost,ddeveloperr/Ghost,jparyani/GhostSS,Gargol/Ghost,ngosinafrica/SiteForNGOs,FredericBernardo/Ghost,karmakaze/Ghost,devleague/uber-hackathon,cysys/ghost-openshift,lukekhamilton/Ghost,kmeurer/Ghost,tuan/Ghost,andrewconnell/Ghost,singular78/Ghost,codeincarnate/Ghost,dbalders/Ghost,manishchhabra/Ghost,alecho/Ghost,dbalders/Ghost,TryGhost/Ghost,AnthonyCorrado/Ghost,jomofrodo/ccb-ghost,InnoD-WebTier/hardboiled_ghost,krahman/Ghost,mohanambati/Ghost,singular78/Ghost,icowan/Ghost,shannonshsu/Ghost,julianromera/Ghost,morficus/Ghost,dqj/Ghost,petersucks/blog,k2byew/Ghost,YY030913/Ghost,tmp-reg/Ghost,bastianbin/Ghost,Loyalsoldier/Ghost,jorgegilmoreira/ghost,dgem/Ghost,jin/Ghost,hoxoa/Ghost,jorgegilmoreira/ghost,alecho/Ghost,mlabieniec/ghost-env,kevinansfield/Ghost,aexmachina/blog-old,optikalefx/Ghost,daimaqiao/Ghost-Bridge,jomahoney/Ghost,sceltoas/Ghost,letsjustfixit/Ghost,Elektro1776/javaPress,nmukh/Ghost,acburdine/Ghost,rizkyario/Ghost,sifatsultan/js-ghost,lukw00/Ghost,skleung/blog,ThorstenHans/Ghost,developer-prosenjit/Ghost,ryanbrunner/crafters,BlueHatbRit/Ghost,lethalbrains/Ghost,letsjustfixit/Ghost,ignasbernotas/nullifer,dgem/Ghost,zeropaper/Ghost,sebgie/Ghost,lukaszklis/Ghost,yanntech/Ghost,floofydoug/Ghost,epicmiller/pages,diogogmt/Ghost,rito/Ghost,Romdeau/Ghost,bsansouci/Ghost,pensierinmusica/Ghost,tadityar/Ghost,Yarov/yarov,makapen/Ghost,aroneiermann/GhostJade,lowkeyfred/Ghost,zumobi/Ghost,UsmanJ/Ghost,jaswilli/Ghost,Rovak/Ghost,kmeurer/Ghost,wangjun/Ghost,disordinary/Ghost,PDXIII/Ghost-FormMailer,developer-prosenjit/Ghost,stridespace/Ghost,daimaqiao/Ghost-Bridge,NodeJSBarenko/Ghost,katiefenn/Ghost,tadityar/Ghost,mohanambati/Ghost,cwonrails/Ghost,stridespace/Ghost,jeonghwan-kim/Ghost,achimos/ghost_as,Yarov/yarov,hyokosdeveloper/Ghost,cncodog/Ghost-zh-codog,Dnlyc/Ghost,mayconxhh/Ghost,BlueHatbRit/Ghost,johnnymitch/Ghost,tandrewnichols/ghost,makapen/Ghost,shannonshsu/Ghost,NamedGod/Ghost,theonlypat/Ghost,schematical/Ghost,handcode7/Ghost,Shauky/Ghost,tidyui/Ghost,chevex/undoctrinate,SkynetInc/steam,flomotlik/Ghost,cncodog/Ghost-zh-codog,yanntech/Ghost,Kikobeats/Ghost,wspandihai/Ghost,javimolla/Ghost,Brunation11/Ghost,laispace/laiblog,RoopaS/demo-intern,e10/Ghost,Remchi/Ghost,hnarayanan/narayanan.co,davidenq/Ghost-Blog,mdbw/ghost,rmoorman/Ghost,r14r/fork_nodejs_ghost,influitive/crafters,rouanw/Ghost,JulienBrks/Ghost,rouanw/Ghost,atandon/Ghost,TryGhost/Ghost,johngeorgewright/blog.j-g-w.info,Dnlyc/Ghost,janvt/Ghost,VillainyStudios/Ghost,aroneiermann/GhostJade,Bunk/Ghost,acburdine/Ghost,singular78/Ghost,kolorahl/Ghost,edurangel/Ghost,tksander/Ghost,ClarkGH/Ghost,situkangsayur/Ghost,vloom/blog,thomasalrin/Ghost,greyhwndz/Ghost,TribeMedia/Ghost,vainglori0us/urban-fortnight,PeterCxy/Ghost,nakamuraapp/new-ghost,virtuallyearthed/Ghost,JonathanZWhite/Ghost,blankmaker/Ghost,alexandrachifor/Ghost,pbevin/Ghost,davidenq/Ghost-Blog,pbevin/Ghost,cwonrails/Ghost | ---
+++
@@ -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.replace(/\n /gi, '\n'); // exclude newline with a start spacing
+ s = s.replace(/\n+/gi, '\n');
+ return s.split(/ |\n/).length;
} |
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__title'>Hold a Workshop</h1>
<div className='prose prose--responsive'>
<p>Interested in convening various members of your community around open air quality data? We can help!</p>
<p><a href='#' className='workshop-go-button' title='Learn more'><span>Learn how</span></a></p>
</div>
</header>
<figure className='workshop-fold__media'>
<img src='/assets/graphics/content/view--community-workshops/workshop-fold-media.jpg' alt='Cover image' width='830' height='830' />
</figure>
</div>
</section>
);
}
});
module.exports = WorkshopFold;
| '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'>
<h1 className='workshop-fold__title'>Hold a Workshop</h1>
<div className='prose prose--responsive'>
<p>Interested in convening various members of your community around open air quality data? We can help!</p>
<p><Link to='/community' className='workshop-go-button' title='Learn more'><span>Learn how</span></Link></p>
</div>
</header>
<figure className='workshop-fold__media'>
<img src='/assets/graphics/content/view--community-workshops/workshop-fold-media.jpg' alt='Cover image' width='830' height='830' />
</figure>
</div>
</section>
);
}
});
module.exports = WorkshopFold;
| 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--responsive'>
<p>Interested in convening various members of your community around open air quality data? We can help!</p>
- <p><a href='#' className='workshop-go-button' title='Learn more'><span>Learn how</span></a></p>
+ <p><Link to='/community' className='workshop-go-button' title='Learn more'><span>Learn how</span></Link></p>
</div>
</header>
|
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(filters) {
if (filters) {
return this.collection.find(filters).toArray();
}
return this.collection.find().toArray();
}
create(model) {
const modelState = this.validate(model);
if (!modelState.isValid) {
return Promise.reject(modelState.errors);
}
return this.collection.insert(model)
.then(() => {
// TODO: refactor, parameters?, should return the whole model?
return model;
});
}
/*
findOrCreateBy(props) do we need this function ?
https://github.com/TelerikAcademy/Web-Applications-with-Node.js/blob/master/Live-demos/project-structure/data/base/base.data.js
*/
updateById(model) {
return this.collection.updateOne({
_id: model._id,
}, model);
}
validate(model) {
if (!this.validator || typeof this.validator.isValid !== 'function') {
return ModelState.valid();
}
return this.validator.isValid(model);
}
}
module.exports = BaseData;
| 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(filters) {
if (filters) {
return this.collection.find(filters).toArray();
}
return this.collection.find().toArray();
}
create(model) {
const modelState = this.validate(model);
if (!modelState.isValid) {
return Promise.reject(modelState.errors);
}
return this.collection.insert(model)
.then((status) => {
// conatins the created Id
return status.ops[0];
// return model;
});
}
/*
findOrCreateBy(props) do we need this function ?
https://github.com/TelerikAcademy/Web-Applications-with-Node.js/blob/master/Live-demos/project-structure/data/base/base.data.js
*/
updateById(model) {
return this.collection.updateOne({
_id: model._id,
}, model);
}
validate(model) {
if (!this.validator || typeof this.validator.isValid !== 'function') {
return ModelState.valid();
}
return this.validator.isValid(model);
}
}
module.exports = BaseData;
| 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
+ return status.ops[0];
+ // return model;
});
}
|
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, players) => {
var poi = [
'crates',
'boxes',
'bags',
'food'
];
if (poi.indexOf(args.toLowerCase()) > -1) {
findFood(player, players);
if (!player.explore('found food')) {
player.emit('experience', 100);
}
}
};
}
};
function getRand() {
return Math
.floor(Math
.random() * 5) + 5;
}
function seeDisturbance(player, players) {
player.setAttribute('health', player.getAttribute('health') +
getRand());
player.sayL10n(l10n, 'FOUND_FOOD');
players.eachIf(p => CommandUtil.otherPlayerInRoom(p),
p => { p.sayL10n(l10n, 'OTHER_FOUND_FOOD', player.getName()); });
}
| 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, players) => {
var poi = [
'crates',
'boxes',
'bags',
'food'
];
if (poi.indexOf(args.toLowerCase()) > -1 && getRand() > 3) {
findFood(player, players);
}
};
}
};
function getRand() {
return Math
.floor(Math
.random() * 5) + 1;
}
function findFood(player, players) {
player.setAttribute('health', player.getAttribute('health') +
getRand());
player.sayL10n(l10n, 'FOUND_FOOD');
players.eachIf(p => CommandUtil.otherPlayerInRoom(p),
p => { p.sayL10n(l10n, 'OTHER_FOUND_FOOD', player.getName()); });
}
| 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);
- }
}
};
}
@@ -29,10 +26,11 @@
function getRand() {
return Math
.floor(Math
- .random() * 5) + 5;
+ .random() * 5) + 1;
}
-function seeDisturbance(player, players) {
+function findFood(player, players) {
+
player.setAttribute('health', player.getAttribute('health') +
getRand());
player.sayL10n(l10n, 'FOUND_FOOD'); |
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.panel.hide()
}
set visibility(value){
if(value){
this.removeAttribute('hidden')
} else {
this.setAttribute('hidden', true)
}
}
updateMessages(messages, isProject){
while(this.firstChild){
this.removeChild(this.firstChild)
}
if(!messages.length){
return this.visibility = false
}
this.visibility = true
messages.forEach(function(message){
this.appendChild(Message.fromMessage(message, {addPath: isProject, cloneNode: true}))
}.bind(this))
}
clear(){
while(this.firstChild){
this.removeChild(this.firstChild)
}
}
}
module.exports = document.registerElement('linter-panel', {prototype: BottomPanel.prototype})
| '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.panel.hide()
}
set visibility(value){
if(value){
this.removeAttribute('hidden')
} else {
this.setAttribute('hidden', true)
}
}
updateMessages(messages, isProject){
this.clear()
if(!messages.length){
return this.visibility = false
}
this.visibility = true
messages.forEach(function(message){
this.appendChild(Message.fromMessage(message, {addPath: isProject, cloneNode: true}))
}.bind(this))
}
clear(){
while(this.firstChild){
this.removeChild(this.firstChild)
}
}
}
module.exports = document.registerElement('linter-panel', {prototype: BottomPanel.prototype})
| 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 (challenges) {
if (challenges.length > 0) {
return challenges.map((challenge) => {
return <ChallengeCard key={challenge.key} order={challenge.order} challenge={challenge}/>;
})
.sort((a, b) => {
if (a.props.order > b.props.order) return 1;
else if (a.props.order < b.props.order) return -1;
else return 0;
});
}
else {
return (
<div style={{textAlign:'center',margin:'3rem'}}>
<h4 className='pt-text-muted'>No challenges available.</h4>
</div>
);
}
}
else {
return (
<div style={{textAlign:'center',margin:'3rem'}}>
<Spinner/>
</div>
);
}
}
}
export default ChallengeList;
| 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;
if (challenges) {
if (challenges.length > 0) {
return challenges.map((challenge) => {
return <ChallengeCard key={challenge.key} order={challenge.order} challenge={challenge}/>;
})
.sort((a, b) => {
if (a.props.order > b.props.order) return 1;
else if (a.props.order < b.props.order) return -1;
else return 0;
});
}
else {
return (
<div style={{margin:'3rem 0'}}>
<NonIdealState title='No challenges' description='No challenges are currently available.' visual='map'/>
</div>
);
}
}
else {
return (
<div style={{textAlign:'center',margin:'3rem'}}>
<Spinner/>
</div>
);
}
}
}
export default ChallengeList;
| 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={{textAlign:'center',margin:'3rem'}}>
- <h4 className='pt-text-muted'>No challenges available.</h4>
+ <div style={{margin:'3rem 0'}}>
+ <NonIdealState title='No challenges' description='No challenges are currently available.' visual='map'/>
</div>
);
} |
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.deploy(InsecureTargetBounty);
};
};
| 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.deploy(InsecureTargetBounty);
};
};
| 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,AragonOne/zeppelin-solidity,OpenZeppelin/zeppelin-solidity,AragonOne/zeppelin-solidity,dmx374/zeppelin-solidity | ---
+++
@@ -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) {
configurator.defineConfiguration(res.data);
});
}
}
}
});
| 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) {
+ return $http.get(url).then(function(res) {
+ configurator.defineConfiguration(res.data);
+ });
+ }
+ }
+ }
}); |
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 urlObj = JSON.parse(JSON.stringify(config));
urlObj.pathname = '/streams/' + stream + '/' + startPosition + '/' + direction + '/' + length + '?embed=body';
return url.format(urlObj);
};
return function(streamName, startPosition, length, direction) {
return q().then(function() {
assert(streamName, baseErr + 'Stream Name not provided');
startPosition = startPosition || 0;
length = length || 1000;
direction = direction || 'forward';
var options = {
uri: buildUrl(streamName, startPosition, length, direction),
headers: {
"Content-Type": "application/vnd.eventstore.events+json"
},
method: 'GET',
json: true
};
debug('', 'Getting Events: ' + JSON.stringify(options));
return req(options).then(function(response) {
response.entries.forEach(function(entry) {
entry.data = JSON.parse(entry.data);
});
if (direction == 'forward')
return response.entries;
return response.entries.reverse();
});
});
};
}; | 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 urlObj = JSON.parse(JSON.stringify(config));
urlObj.pathname = '/streams/' + stream + '/' + startPosition + '/' + direction + '/' + length;
return url.format(urlObj);
};
return function(streamName, startPosition, length, direction) {
return q().then(function() {
assert(streamName, baseErr + 'Stream Name not provided');
startPosition = startPosition || 0;
length = length || 1000;
direction = direction || 'forward';
var options = {
uri: buildUrl(streamName, startPosition, length, direction),
method: 'GET',
headers: {
"Content-Type": "application/vnd.eventstore.events+json"
},
qs: {
embed: 'body'
},
json: true
};
debug('', 'Getting Events: ' + JSON.stringify(options));
return req(options).then(function(response) {
response.entries.forEach(function(entry) {
entry.data = JSON.parse(entry.data);
});
if (direction == 'forward')
return response.entries;
return response.entries.reverse();
});
});
};
}; | 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';
+ urlObj.pathname = '/streams/' + stream + '/' + startPosition + '/' + direction + '/' + length;
return url.format(urlObj);
};
@@ -23,10 +23,13 @@
var options = {
uri: buildUrl(streamName, startPosition, length, direction),
+ method: 'GET',
headers: {
"Content-Type": "application/vnd.eventstore.events+json"
},
- method: 'GET',
+ qs: {
+ embed: 'body'
+ },
json: true
};
debug('', 'Getting Events: ' + JSON.stringify(options)); |
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) {
reply('Hello from SpotScore API!');
}
});
| 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) {
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',
handler: function (request, reply) {
var location = request.params.location;
var address = request.params.address;
var categories = request.params.categories;
var bbox = request.params.bbox;
var radius = request.params.radius;
var nearest = request.params.nearest;
// Make actual request to database
// Compile the JSON response
reply();
}
});
| 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',
+ handler: function (request, reply) {
+ var location = request.params.location;
+ var address = request.params.address;
+ var categories = request.params.categories;
+ var bbox = request.params.bbox;
+ var radius = request.params.radius;
+ var nearest = request.params.nearest;
+
+ // Make actual request to database
+
+ // Compile the JSON response
+
+ reply();
+ }
+}); |
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)
-require('./src/commands/make.js')(app)
+commands.forEach(function (command) {
+ require('./src/commands/' + command + '.js')(app)
+})
app.run() |
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 = [
'@glimmer/application',
'@glimmer/resolver',
'@glimmer/compiler',
'@glimmer/di',
'@glimmer/object-reference',
'@glimmer/reference',
'@glimmer/runtime',
'@glimmer/syntax',
'@glimmer/util',
'@glimmer/wire-format'
].map(packageDist);
vendorTrees.push(buildVendorPackage('simple-html-tokenizer'));
vendorTrees.push(funnel(path.dirname(require.resolve('handlebars/package')), {
include: ['dist/handlebars.amd.js'] }));
return build({
vendorTrees,
external: [
'@glimmer/application',
'@glimmer/resolver',
'@glimmer/compiler',
'@glimmer/reference',
'@glimmer/util',
'@glimmer/runtime',
'@glimmer/di'
]
});
}
| "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 = [
'@glimmer/application',
'@glimmer/resolver',
'@glimmer/compiler',
'@glimmer/di',
'@glimmer/object-reference',
'@glimmer/reference',
'@glimmer/runtime',
'@glimmer/syntax',
'@glimmer/util',
'@glimmer/wire-format',
'@glimmer/env'
].map(packageDist);
vendorTrees.push(buildVendorPackage('simple-html-tokenizer'));
vendorTrees.push(funnel(path.dirname(require.resolve('handlebars/package')), {
include: ['dist/handlebars.amd.js'] }));
return build({
vendorTrees,
external: [
'@glimmer/application',
'@glimmer/resolver',
'@glimmer/compiler',
'@glimmer/reference',
'@glimmer/util',
'@glimmer/runtime',
'@glimmer/di',
'@glimmer/env'
]
});
}
| 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',
'@glimmer/util',
'@glimmer/runtime',
- '@glimmer/di'
+ '@glimmer/di',
+ '@glimmer/env'
]
});
} |
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.
* @type {string}
*/
$scope.mjpegStreamURL = $location.protocol() + '://' + $location.host() + ':9000/stream/video.mjpeg';
/**
* Expose rover state from rover service.
* Used to hide controls if driver mode not available
*/
$scope.roverState = roverService.roverState;
/**
* As soon as the view is opened, we try to register this user as a driver.
*/
console.log('Enter Driver Mode (from roverMaster)');
roverService.enterDriverMode();
$scope.stop = function() {
roverService.stop();
};
/**
* Exit the driver mode as soon as a user navigates to another page.
*/
$scope.$on('$routeChangeStart', function(event, next, current) {
console.log('Exit Driver Mode, changing to URL' + next.$$route.originalPath);
roverService.exitDriverMode();
});
}]); | '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.
* @type {string}
*/
$scope.mjpegStreamURL = $location.protocol() + '://' + $location.host() + ':9000/stream/video.mjpeg';
/**
* Expose rover state from rover service.
* Used to hide controls if driver mode not available
*/
$scope.roverState = roverService.roverState;
/**
* 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 the user is allowed, we try to register them as a driver.
*/
redirectWrongDeviceSize();
console.log('Enter Driver Mode (from roverMaster)');
roverService.enterDriverMode();
$scope.stop = function() {
roverService.stop();
};
/**
* Exit the driver mode as soon as a user navigates to another page.
*/
$scope.$on('$routeChangeStart', function(event, next, current) {
console.log('Exit Driver Mode, changing to URL' + next.$$route.originalPath);
roverService.exitDriverMode();
});
/**
* If the device is larger than medium, redirect the user to the main page.
*/
function redirectWrongDeviceSize() {
if(!$mdMedia('gt-md')) {
$location.path('/main');
}
}
}]); | 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 the user is allowed, we try to register them as a driver.
*/
+ redirectWrongDeviceSize();
console.log('Enter Driver Mode (from roverMaster)');
roverService.enterDriverMode();
@@ -34,4 +37,13 @@
console.log('Exit Driver Mode, changing to URL' + next.$$route.originalPath);
roverService.exitDriverMode();
});
+
+ /**
+ * If the device is larger than medium, redirect the user to the main page.
+ */
+ function redirectWrongDeviceSize() {
+ if(!$mdMedia('gt-md')) {
+ $location.path('/main');
+ }
+ }
}]); |
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: 'authorizer:jwt',
});
| 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: 'authorizer:jwt',
});
| 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: 'authorizer:jwt', |
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 bindActionCreators(Window1Actions, dispatch);
}
export default connect(mapStateToProps, mapDispatchToProps)(Facets);
| 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 bindActionCreators(Window1Actions, dispatch);
}
export default connect(mapStateToProps, mapDispatchToProps)(Facets);
| 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.
*
* e.g.
* <ov-index></ov-index>
*/
app.directive("ovChapters", ovChapters);
ovChapters.$inject = ["ovChaptersLink"];
function ovChapters(ovChaptersLink){
return {
require : "^ovPlayer",
restrict : "E",
templateUrl : ovPlayerDirectory + "templates/chapters.html",
scope : true,
link : ovChaptersLink
}
}
app.factory("ovChaptersLink", function(){
return function(scope, element, attrs, playerCtrl){
scope.chapters = scope.data.chapter;
scope.open = function(chapter){
if(!chapter.isOpen)
angular.forEach(scope.chapters, function (value, key) {
value.isOpen = false;
});
chapter.isOpen = !chapter.isOpen;
}
/**
* Seeks media to the given timecode.
* @param Number timecode The timecode to seek to
*/
scope.goToTimecode = function(time){
if(time <= 1)
playerCtrl.player.setTime(time * scope.duration);
};
};
});
})(angular.module("ov.player")); | (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.
*
* e.g.
* <ov-index></ov-index>
*/
app.directive("ovChapters", ovChapters);
ovChapters.$inject = ["ovChaptersLink"];
function ovChapters(ovChaptersLink){
return {
require : "^ovPlayer",
restrict : "E",
templateUrl : ovPlayerDirectory + "templates/chapters.html",
scope : true,
link : ovChaptersLink
}
}
app.factory("ovChaptersLink", function(){
return function(scope, element, attrs, playerCtrl){
scope.chapters = scope.data.chapter;
scope.open = function(chapter){
if(!chapter.isOpen)
angular.forEach(scope.chapters, function (value, key) {
value.isOpen = false;
});
chapter.isOpen = !chapter.isOpen;
}
/**
* Seeks media to the given timecode.
* @param Number timecode The timecode to seek to
*/
scope.goToTimecode = function(time){
if(time <= 1)
playerCtrl.setTime(time * scope.duration);
};
};
});
})(angular.module("ov.player")); | 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 Model';
this.EVENT = PS.CDE;
}
}
// ----------------------------------------------------------------
// View
class CardDetailView extends CommonView {
constructor(_model = new CardDetailModel()) {
super(_model);
this.NAME = 'Card Detail View';
}
}
// ----------------------------------------------------------------
// Controller
class CardDetailController extends CommonController {
constructor(_obj) {
super(_obj);
this.model = new CardDetailModel(_obj);
this.view = new CardDetailView(this.model);
this.NAME = 'Card Detail Controller';
this.model.ID = null;
this.model.HASH = null;
this.model.CARD = null;
}
}
// ----------------------------------------------------------------
// Event
class CardDetailEvent extends CommonEvent {
constructor({
name = 'Card Detail Event'
} = {})
{
super({
name: name
});
PS.CDE = this;
this.NAME = name;
this.CONTROLLER = new CardDetailController({
name: 'Card Detail Controller',
});
}
}
|
// ----------------------------------------------------------------
// CardDetail Class
// ----------------------------------------------------------------
// Model
class CardDetailModel extends CommonModel {
constructor({
name
} = {}) {
super({
name: name
});
this.NAME = 'Card Detail Model';
this.EVENT = PS.CDE;
this.ID = null;
this.HASH = null;
this.CARD = null;
}
}
// ----------------------------------------------------------------
// View
class CardDetailView extends CommonView {
constructor(_model = new CardDetailModel()) {
super(_model);
this.NAME = 'Card Detail View';
}
}
// ----------------------------------------------------------------
// Controller
class CardDetailController extends CommonController {
constructor(_obj) {
super(_obj);
this.model = new CardDetailModel(_obj);
this.view = new CardDetailView(this.model);
this.NAME = 'Card Detail Controller';
}
}
// ----------------------------------------------------------------
// Event
class CardDetailEvent extends CommonEvent {
constructor({
name = 'Card Detail Event'
} = {})
{
super({
name: name
});
PS.CDE = this;
this.NAME = name;
this.CONTROLLER = new CardDetailController({
name: 'Card Detail Controller',
});
}
}
| 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 = null;
- this.model.HASH = null;
- this.model.CARD = null;
}
}
|
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: true,
defaultValue: null
}, {
name: 'Class',
defaultValue: 'Slate\\Progress\\Note'
}, {
name: 'ContextClass',
defaultValue: 'Emergence\\People\\Person'
}, {
name: 'ContextID',
type: 'integer'
}, {
name: 'AuthorID',
type: 'integer',
useNull: true,
defaultValue: null,
persist: false
}, {
name: 'Author',
useNull: true,
defaultValue: null,
persist: false
}, {
name: 'Message',
type: 'string',
allowBlank: false
}, {
name: 'MessageFormat',
defaultValue: 'html'
}, {
name: 'Status',
useNull: true,
defaultValue: null
}, {
name: 'Source',
useNull: true,
defaultValue: null
}, {
name: 'ParentMessageID',
type: 'integer',
useNull: true,
defaultValue: null
}, {
name: 'Sent',
type: 'date',
dateFormat: 'timestamp'
}
],
proxy: {
type: 'slaterecords',
writer: {
type: 'json',
rootProperty: 'data',
writeAllFields: false,
allowSingle: false
},
url: '/notes'
}
});
| /*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: true,
defaultValue: null
}, {
name: 'Class',
defaultValue: 'Slate\\Progress\\Note'
}, {
name: 'ContextClass',
defaultValue: 'Emergence\\People\\Person'
}, {
name: 'ContextID',
type: 'integer'
}, {
name: 'AuthorID',
type: 'integer',
useNull: true,
defaultValue: null,
persist: false
}, {
name: 'Author',
useNull: true,
defaultValue: null,
persist: false
}, {
name: 'Message',
type: 'string',
allowBlank: false
}, {
name: 'MessageFormat',
defaultValue: 'html'
}, {
name: 'Status',
useNull: true,
defaultValue: null
}, {
name: 'Source',
useNull: true,
defaultValue: null
}, {
name: 'ParentMessageID',
type: 'integer',
useNull: true,
defaultValue: null
}, {
name: 'Sent',
type: 'date',
dateFormat: 'timestamp'
}
],
proxy: {
type: 'slaterecords',
url: '/notes',
include: ['Author']
}
});
| 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.completeLoad(moduleName)
}
};
xhr.send(null);
};
| 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//@ sourceURL=" + url);
context.completeLoad(moduleName)
}
};
xhr.send(null);
};
| 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-skeleton,TomTom101/CyfeFormatting,andrelaszlo/dropbox-hackathon-extension,trychameleon/preview.crx,rhema/explorde,algolia/github-awesome-autocomplete,onemrkarthik/chrome-extension-skeleton,andrelaszlo/dropbox-hackathon-extension,salsita/chrome-extension-skeleton,onemrkarthik/chrome-extension-skeleton,trychameleon/preview.crx,andrewleech/netflix.player.controls,algolia/github-awesome-autocomplete,andrewleech/netflix.player.controls,algolia/github-awesome-autocomplete,alivedise/chrome-extension-skeleton,lautis/github-awesome-autocomplete,tedbow/drupal-pull-requests,alivedise/chrome-extension-skeleton,TomTom101/CyfeFormatting,lautis/github-awesome-autocomplete,trychameleon/preview.crx,rhema/explorde,clementlamoureux/gpm-popularity | ---
+++
@@ -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.completeLoad(moduleName)
}
}; |
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
"https://github.com/meteor/cordova-plugin-googleplus.git#3095abe327e710ab04059ae9d3521bd4037c5a37";
Cordova.depends({
"cordova-plugin-googleplus": cordovaPluginGooglePlusURL
});
Package.onUse(api => {
api.use("ecmascript");
api.use('oauth2', ['client', 'server']);
api.use('oauth', ['client', 'server']);
api.use('http', ['server']);
api.use('service-configuration');
api.use('random', 'client');
api.addFiles('google_server.js', 'server');
api.addFiles('google_client.js', 'client');
api.addFiles('google_sign-in.js', 'web.cordova');
api.mainModule('namespace.js');
api.export('Google');
});
| 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('service-configuration');
api.use('random', 'client');
api.addFiles('google_server.js', 'server');
api.addFiles('google_client.js', 'client');
api.addFiles('google_sign-in.js', 'web.cordova');
api.mainModule('namespace.js');
api.export('Google');
});
| 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.com/EddyVerbruggen/cordova-plugin-googleplus/pull/366
- "https://github.com/meteor/cordova-plugin-googleplus.git#3095abe327e710ab04059ae9d3521bd4037c5a37";
-
Cordova.depends({
- "cordova-plugin-googleplus": cordovaPluginGooglePlusURL
+ "cordova-plugin-googleplus": "8.4.0",
});
Package.onUse(api => { |
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();
});
});
export default router;
| 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();
}, 1000);
});
export default router;
| 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,skallet/este,abelaska/este,syroegkin/mikora.eu,este/este,este/este,langpavel/este,sikhote/davidsinclair,srhmgn/markdowner,steida/este,AlesJiranek/este,glaserp/Maturita-Project,neozhangthe1/framedrop-web,skyuplam/debt_mgmt,shawn-dsz/este,sljuka/portfolio-este,TheoMer/este,blueberryapps/este,abelaska/este,sljuka/portfolio-este,jaeh/este,christophediprima/este,TheoMer/este,XeeD/este,gaurav-/este,Brainfock/este,ViliamKopecky/este,SidhNor/este-cordova-starter-kit,XeeD/test,AlesJiranek/este,sljuka/portfulio,AugustinLF/este,christophediprima/este,robinpokorny/este,youprofit/este,laxplaer/este,skallet/este,vacuumlabs/este,estaub/my-este,este/este,zanj2006/este,sikhote/davidsinclair,amrsekilly/updatedEste,Tzitzian/Oppex,cjk/smart-home-app,MartinPavlik/este,neozhangthe1/framedrop-web,este/este,skaldo/este,christophediprima/este,steida/este,AugustinLF/este,robinpokorny/este,hsrob/league-este,XeeD/test,sikhote/davidsinclair,syroegkin/mikora.eu,puzzfuzz/othello-redux,blueberryapps/este,terakilobyte/esterethinksocketchat,skyuplam/debt_mgmt,XeeD/este,cazacugmihai/este,vacuumlabs/este,abelaska/este,skallet/este,estaub/my-este,nason/este,aindre/este-example,sljuka/bucka-portfolio,neozhangthe1/framedrop-web,GarrettSmith/schizophrenia,GarrettSmith/schizophrenia,amrsekilly/updatedEste,TheoMer/Gyms-Of-The-World,langpavel/este,robinpokorny/este,aindre/este-example,neozhangthe1/framedrop-web | ---
+++
@@ -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_text_field';
}
}.property(),
isEmpty: function(){
return Ember.isEmpty(this.get('content'));
}.property('content'),
inputField: Ember.TextField.extend({}),
emptyValue: "Click to Edit",
focusOut: function(){
this.get('controller').get('store').commit();
this.set('isEditing', false);
},
click: function(){
this.set("isEditing", true);
}
});
export default InPlaceFieldView;
| //
//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_place_text_field';
}
}.property(),
isEmpty: function(){
return Ember.isEmpty(this.get('content'));
}.property('content'),
inputField: Ember.TextField.extend({}),
emptyValue: "Click to Edit",
focusOut: function(){
this.get('controller').get('store').commit();
this.set('isEditing', false);
},
click: function(){
this.set("isEditing", true);
}
});
export default InPlaceFieldView;
| 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-378db51f2d332dd53a5ca02cf6ca5b54' }],
seq: 14
}
]
const stream = new CouchDBChangesResponse({
type: 'normal'
})
const chunks = []
stream.once('readable', assertCalled(() => {
var chunk
while ((chunk = stream.read()) && chunks.push(chunk));
}))
stream.once('finish', assertCalled(() => {
assert.deepEqual(JSON.parse(chunks.join('')), {
results: changes,
last_seq: 14
})
}))
stream.write(changes[0])
stream.write(changes[1])
stream.write({ last_seq: changes[1].seq })
stream.end()
| '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-378db51f2d332dd53a5ca02cf6ca5b54' }],
seq: 14
}
]
const stream = new CouchDBChangesResponse({
type: 'normal'
})
const chunks = []
stream.once('readable', assertCalled(() => {
var chunk
while ((chunk = stream.read()) && chunks.push(chunk));
}))
stream.once('finish', assertCalled(() => {
assert.deepEqual(JSON.parse(chunks.join('')), {
results: changes,
last_seq: changes[1].seq
})
}))
stream.write(changes[0])
stream.write(changes[1])
stream.write({ last_seq: changes[1].seq })
stream.end()
| 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: {
noInfo: true
}
};
| 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 = datasourceTools.extractDSStrProps(props);
test.strictEqual(extracted.ds, "text", "Should extract datasource type correctly");
test.strictEqual(extracted.something, "1", "Should extract basic properties");
test.strictEqual(extracted["another-one"], "something.else", "Should extract properties with other characters");
test.strictEqual(extracted.empty, "", "Should extract empty properties");
test.done();
}
}
};
| 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 = datasourceTools.extractDSStrProps(props);
test.strictEqual(extracted.ds, "text", "Should extract datasource type correctly");
test.strictEqual(extracted.something, "1", "Should extract basic properties");
test.strictEqual(extracted["another-one"], "something.else", "Should extract properties with other characters");
test.strictEqual(extracted.empty, "", "Should extract empty properties");
test.done();
}
}
};
| 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.extractDSStrProps(props);
test.strictEqual(extracted.ds, "text", "Should extract datasource type correctly");
test.strictEqual(extracted.something, "1", "Should extract basic properties"); |
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, callback ) {
var newUserData = {
email: email,
password: bcrypt.hashSync( password, 8 ),
role: "admin"
};
appModels.User.create( newUserData, function ( err, newUser ) {
if ( err ) {
return callback( systemError( err ) );
}
return callback( null, {} );
} );
};
| 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 ( email, password, callback ) {
var newUserData = {
email: email,
password: bcrypt.hashSync( password, 8 ),
role: "admin"
};
appModels.User.create( newUserData, function ( err, newUser ) {
if ( err ) {
return callback( systemError( err ) );
}
return callback( null, {} );
} );
};
| 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.standard = MongooseDataManager( appModels.User ); |
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,
},
blocks: {
type: Sequelize.INTEGER,
allowNull: false,
validate: {
min: 0,
},
},
clocks: {
type: Sequelize.INTEGER,
allowNull: false,
validate: {
min: 0,
},
},
score: {
type: Sequelize.INTEGER,
allowNull: false,
validate: {
min: 0,
},
},
stageId: {
type: Sequelize.INTEGER,
references: {
model: Stage,
key: 'id',
},
},
});
Submission.belongsTo(Stage);
module.exports = Submission;
| 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,
},
blocks: {
type: Sequelize.INTEGER,
allowNull: false,
validate: {
min: 0,
},
},
clocks: {
type: Sequelize.INTEGER,
allowNull: false,
validate: {
min: 0,
},
},
score: {
type: Sequelize.INTEGER,
allowNull: false,
validate: {
min: 0,
},
},
stageId: {
type: Sequelize.INTEGER,
references: {
model: Stage,
key: 'id',
},
},
version: {
type: Sequelize.INTEGER,
allowNull: false,
defaultValue: 1,
validate: {
min: 1,
},
},
});
Submission.belongsTo(Stage);
module.exports = Submission;
| 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.dumpAsTextWithPixelResults();
else
testRunner.dumpAsText();
if (window.testIsAsync)
testRunner.waitUntilDone();
if (document.body)
document.body.offsetTop;
else if (document.documentElement)
document.documentElement.offsetTop;
window.internals.startTrackingRepaints(document);
repaintTest();
if (!window.testIsAsync)
finishRepaintTest();
}
function finishRepaintTest()
{
// Force a style recalc.
var dummy = document.body.offsetTop;
var repaintRects = window.internals.repaintRectsAsText(document);
internals.stopTrackingRepaints(document);
var pre = document.createElement('pre');
document.body.appendChild(pre);
pre.textContent += repaintRects;
if (window.afterTest)
window.afterTest();
if (window.testIsAsync)
testRunner.notifyDone();
}
| // 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.dumpAsTextWithPixelResults();
else
testRunner.dumpAsText();
if (window.testIsAsync)
testRunner.waitUntilDone();
if (document.body)
document.body.offsetTop;
else if (document.documentElement)
document.documentElement.offsetTop;
window.internals.startTrackingRepaints(document);
repaintTest();
if (!window.testIsAsync)
finishRepaintTest();
}
function finishRepaintTest()
{
// Force a style recalc.
var dummy = document.body.offsetTop;
var repaintRects = window.internals.repaintRectsAsText(document);
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;
if (window.afterTest)
window.afterTest();
if (window.testIsAsync)
testRunner.notifyDone();
}
| 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/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,smishenk/blink-crosswalk,modulexcite/blink,kurli/blink-crosswalk,kurli/blink-crosswalk,modulexcite/blink,kurli/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Bysmyyr/blink-crosswalk,Pluto-tv/blink-crosswalk,Bysmyyr/blink-crosswalk,ondra-novak/blink,XiaosongWei/blink-crosswalk,modulexcite/blink,ondra-novak/blink,ondra-novak/blink,nwjs/blink,kurli/blink-crosswalk,ondra-novak/blink,Bysmyyr/blink-crosswalk,kurli/blink-crosswalk,PeterWangIntel/blink-crosswalk,PeterWangIntel/blink-crosswalk,Pluto-tv/blink-crosswalk,XiaosongWei/blink-crosswalk,modulexcite/blink,hgl888/blink-crosswalk-efl,Bysmyyr/blink-crosswalk,kurli/blink-crosswalk,modulexcite/blink,Pluto-tv/blink-crosswalk,PeterWangIntel/blink-crosswalk,jtg-gg/blink,Bysmyyr/blink-crosswalk,smishenk/blink-crosswalk,XiaosongWei/blink-crosswalk,ondra-novak/blink,PeterWangIntel/blink-crosswalk,PeterWangIntel/blink-crosswalk,smishenk/blink-crosswalk,XiaosongWei/blink-crosswalk,nwjs/blink,Pluto-tv/blink-crosswalk,smishenk/blink-crosswalk,XiaosongWei/blink-crosswalk,smishenk/blink-crosswalk,jtg-gg/blink,ondra-novak/blink,ondra-novak/blink,jtg-gg/blink,Bysmyyr/blink-crosswalk,modulexcite/blink,nwjs/blink,XiaosongWei/blink-crosswalk,hgl888/blink-crosswalk-efl,PeterWangIntel/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,modulexcite/blink,hgl888/blink-crosswalk-efl,smishenk/blink-crosswalk,smishenk/blink-crosswalk,modulexcite/blink,nwjs/blink,crosswalk-project/blink-crosswalk-efl,crosswalk-project/blink-crosswalk-efl,smishenk/blink-crosswalk,kurli/blink-crosswalk,jtg-gg/blink,XiaosongWei/blink-crosswalk,jtg-gg/blink,jtg-gg/blink,kurli/blink-crosswalk,XiaosongWei/blink-crosswalk,modulexcite/blink,Bysmyyr/blink-crosswalk,hgl888/blink-crosswalk-efl,crosswalk-project/blink-crosswalk-efl,smishenk/blink-crosswalk,nwjs/blink,jtg-gg/blink,nwjs/blink,Bysmyyr/blink-crosswalk,hgl888/blink-crosswalk-efl,hgl888/blink-crosswalk-efl,Pluto-tv/blink-crosswalk,PeterWangIntel/blink-crosswalk,PeterWangIntel/blink-crosswalk,XiaosongWei/blink-crosswalk,modulexcite/blink,hgl888/blink-crosswalk-efl,jtg-gg/blink,Bysmyyr/blink-crosswalk,XiaosongWei/blink-crosswalk,nwjs/blink,crosswalk-project/blink-crosswalk-efl,crosswalk-project/blink-crosswalk-efl,nwjs/blink,hgl888/blink-crosswalk-efl,nwjs/blink,hgl888/blink-crosswalk-efl,crosswalk-project/blink-crosswalk-efl,Bysmyyr/blink-crosswalk | ---
+++
@@ -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 agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @jsx React.DOM
*/
var React = require('react');
var TodoActions = require('../actions/TodoActions');
var TodoTextInput = require('./TodoTextInput.react');
var Header = React.createClass({
/**
* @return {object}
*/
render: function() {
return (
<header id="header">
<h1>todos</h1>
<TodoTextInput
id="new-todo"
placeholder="What needs to be done?"
onSave={this._onSave}
/>
</header>
);
},
/**
* Event handler called within TodoTextInput.
* Defining this here allows TodoTextInput to be used in multiple places
* in different ways.
* @param {string} text
*/
_onSave: function(text) {
TodoActions.create(text);
}
});
module.exports = Header;
| /**
* 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 agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @jsx React.DOM
*/
var React = require('react');
var TodoActions = require('../actions/TodoActions');
var TodoTextInput = require('./TodoTextInput.react');
var Header = React.createClass({
/**
* @return {object}
*/
render: function() {
return (
<header id="header">
<h1>todos</h1>
<TodoTextInput
id="new-todo"
placeholder="What needs to be done?"
onSave={this._onSave}
/>
</header>
);
},
/**
* Event handler called within TodoTextInput.
* Defining this here allows TodoTextInput to be used in multiple places
* in different ways.
* @param {string} text
*/
_onSave: function(text) {
if(text.trim()){
TodoActions.create(text);
}
}
});
module.exports = Header;
| 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 actions being fired:
1. TODO_CREATE, with an empty string as 'text'
2. TODO_DESTROY
The proposed fix doesn't send a TODO_CREATE if `text.trim() === "")` | 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,STRML/react,luomiao3/react,usgoodus/react,salier/react,skevy/react,guoshencheng/react,jordanpapaleo/react,jimfb/react,inuscript/react,tarjei/react,joaomilho/react,tywinstark/react,glenjamin/react,wudouxingjun/react,felixgrey/react,camsong/react,syranide/react,jorrit/react,bhamodi/react,venkateshdaram434/react,quip/react,yiminghe/react,joaomilho/react,mardigtch/react,pyitphyoaung/react,spt110/react,reactjs-vn/reactjs_vndev,MotherNature/react,wushuyi/react,jlongster/react,aaron-goshine/react,wesbos/react,RReverser/react,shadowhunter2/react,iammerrick/react,bhamodi/react,pze/react,it33/react,wjb12/react,ms-carterk/react,Riokai/react,lucius-feng/react,reactkr/react,trueadm/react,salier/react,hejld/react,ramortegui/react,venkateshdaram434/react,mnordick/react,apaatsio/react,gougouGet/react,btholt/react,sergej-kucharev/react,MichelleTodd/react,andrerpena/react,haoxutong/react,tarjei/react,Furzikov/react,prathamesh-sonpatki/react,linalu1/react,tywinstark/react,orneryhippo/react,theseyi/react,VukDukic/react,perperyu/react,IndraVikas/react,maxschmeling/react,isathish/react,acdlite/react,kolmstead/react,trueadm/react,MotherNature/react,jorrit/react,gregrperkins/react,tlwirtz/react,yangshun/react,salier/react,Jyrno42/react,joecritch/react,stevemao/react,marocchino/react,iamdoron/react,ameyms/react,nsimmons/react,hawsome/react,xiaxuewuhen001/react,facebook/react,syranide/react,dmatteo/react,kakadiya91/react,andrescarceller/react,Flip120/react,bspaulding/react,salier/react,lyip1992/react,silvestrijonathan/react,genome21/react,gitignorance/react,ilyachenko/react,yut148/react,eoin/react,spt110/react,shadowhunter2/react,mtsyganov/react,nsimmons/react,ABaldwinHunter/react-engines,prathamesh-sonpatki/react,yungsters/react,edmellum/react,linalu1/react,6feetsong/react,mnordick/react,songawee/react,flipactual/react,Simek/react,JasonZook/react,panhongzhi02/react,empyrical/react,gj262/react,spicyj/react,gpazo/react,neusc/react,chenglou/react,roylee0704/react,vikbert/react,chacbumbum/react,pdaddyo/react,ericyang321/react,sugarshin/react,wjb12/react,ZhouYong10/react,flarnie/react,bruderstein/server-react,orzyang/react,blainekasten/react,slongwang/react,mtsyganov/react,marocchino/react,scottburch/react,Jericho25/react,rohannair/react,jquense/react,patryknowak/react,orneryhippo/react,ashwin01/react,nathanmarks/react,stanleycyang/react,henrik/react,jagdeesh109/react,yasaricli/react,pletcher/react,mfunkie/react,reggi/react,nickdima/react,musofan/react,slongwang/react,pze/react,greyhwndz/react,TaaKey/react,Duc-Ngo-CSSE/react,laskos/react,lastjune/react,phillipalexander/react,mgmcdermott/react,niubaba63/react,Riokai/react,prometheansacrifice/react,james4388/react,insionng/react,rohannair/react,conorhastings/react,yut148/react,dariocravero/react,Furzikov/react,camsong/react,hzoo/react,tywinstark/react,pod4g/react,AlmeroSteyn/react,TaaKey/react,sarvex/react,trellowebinars/react,roylee0704/react,easyfmxu/react,MichelleTodd/react,gitignorance/react,leohmoraes/react,jagdeesh109/react,niubaba63/react,lonely8rain/react,mcanthony/react,theseyi/react,jimfb/react,mosoft521/react,kamilio/react,willhackett/react,crsr/react,magalhas/react,skyFi/react,greglittlefield-wf/react,dilidili/react,joecritch/react,DJCordhose/react,leohmoraes/react,wjb12/react,10fish/react,yisbug/react,Rafe/react,ninjaofawesome/reaction,rlugojr/react,jeromjoy/react,jontewks/react,skevy/react,salzhrani/react,Flip120/react,cmfcmf/react,shergin/react,gxr1020/react,trellowebinars/react,patryknowak/react,arasmussen/react,rasj/react,gfogle/react,flowbywind/react,pyitphyoaung/react,rickbeerendonk/react,haoxutong/react,SpencerCDixon/react,angeliaz/react,miaozhirui/react,Flip120/react,nickdima/react,kaushik94/react,alwayrun/react,edmellum/react,stardev24/react,VioletLife/react,garbles/react,varunparkhe/react,elquatro/react,ledrui/react,jorrit/react,dariocravero/react,howtolearntocode/react,musofan/react,dgreensp/react,gfogle/react,lennerd/react,dgdblank/react,diegobdev/react,honger05/react,linmic/react,joe-strummer/react,christer155/react,jkcaptain/react,bestwpw/react,nickdima/react,jontewks/react,jabhishek/react,jzmq/react,ajdinhedzic/react,LoQIStar/react,JasonZook/react,deepaksharmacse12/react,andrerpena/react,niole/react,PrecursorApp/react,brillantesmanuel/react,joshblack/react,linmic/react,mtsyganov/react,nLight/react,jmptrader/react,juliocanares/react,zorojean/react,dittos/react,yhagio/react,nathanmarks/react,tom-wang/react,silppuri/react,kaushik94/react,neusc/react,mjul/react,yongxu/react,ssyang0102/react,apaatsio/react,claudiopro/react,liyayun/react,digideskio/react,jfschwarz/react,blainekasten/react,jedwards1211/react,zofuthan/react,bitshadow/react,tomv564/react,rricard/react,kchia/react,salzhrani/react,stanleycyang/react,elquatro/react,TylerBrock/react,terminatorheart/react,guoshencheng/react,odysseyscience/React-IE-Alt,mardigtch/react,Jericho25/react,chrismoulton/react,k-cheng/react,jlongster/react,pdaddyo/react,dirkliu/react,salzhrani/react,roth1002/react,levibuzolic/react,hejld/react,mardigtch/react,cesine/react,niubaba63/react,staltz/react,jsdf/react,tlwirtz/react,negativetwelve/react,silkapp/react,eoin/react,deepaksharmacse12/react,vjeux/react,vikbert/react,ianb/react,shergin/react,mjul/react,apaatsio/react,acdlite/react,arasmussen/react,thomasboyt/react,skomski/react,brigand/react,alvarojoao/react,ABaldwinHunter/react-classic,soulcm/react,zorojean/react,gpazo/react,trungda/react,michaelchum/react,kieranjones/react,crsr/react,nathanmarks/react,PeterWangPo/react,marocchino/react,Simek/react,vjeux/react,edmellum/react,react-china/react-docs,bitshadow/react,jiangzhixiao/react,Rafe/react,spt110/react,gpazo/react,STRML/react,jagdeesh109/react,skyFi/react,lonely8rain/react,yabhis/react,orzyang/react,getshuvo/react,billfeller/react,marocchino/react,trueadm/react,jontewks/react,spicyj/react,yangshun/react,dirkliu/react,michaelchum/react,DJCordhose/react,iamchenxin/react,IndraVikas/react,Instrument/react,sarvex/react,staltz/react,Duc-Ngo-CSSE/react,Galactix/react,jasonwebster/react,qq316278987/react,inuscript/react,Chiens/react,gregrperkins/react,ericyang321/react,sasumi/react,lonely8rain/react,andrerpena/react,joshbedo/react,krasimir/react,theseyi/react,vikbert/react,Flip120/react,Chiens/react,dmitriiabramov/react,with-git/react,DigitalCoder/react,lastjune/react,tomv564/react,cmfcmf/react,davidmason/react,ericyang321/react,pwmckenna/react,acdlite/react,roylee0704/react,yungsters/react,nLight/react,ericyang321/react,chacbumbum/react,stevemao/react,qq316278987/react,zeke/react,dfosco/react,jmacman007/react,tom-wang/react,sasumi/react,zanjs/react,stardev24/react,jfschwarz/react,willhackett/react,Zeboch/react-tap-event-plugin,ZhouYong10/react,aickin/react,easyfmxu/react,zhangwei001/react,panhongzhi02/react,arkist/react,flarnie/react,rasj/react,shripadk/react,quip/react,zanjs/react,alvarojoao/react,chrisjallen/react,8398a7/react,niubaba63/react,chrismoulton/react,mosoft521/react,gpbl/react,leexiaosi/react,jagdeesh109/react,tjsavage/react,mgmcdermott/react,ledrui/react,tako-black/react-1,0x00evil/react,AmericanSundown/react,miaozhirui/react,rricard/react,joe-strummer/react,reactkr/react,cody/react,rlugojr/react,mik01aj/react,zyt01/react,iamchenxin/react,jzmq/react,speedyGonzales/react,jsdf/react,iOSDevBlog/react,MichelleTodd/react,AlmeroSteyn/react,linqingyicen/react,musofan/react,nathanmarks/react,dittos/react,yut148/react,vincentism/react,hawsome/react,dortonway/react,prometheansacrifice/react,brillantesmanuel/react,ZhouYong10/react,shergin/react,howtolearntocode/react,gxr1020/react,usgoodus/react,rickbeerendonk/react,pswai/react,sarvex/react,darobin/react,OculusVR/react,speedyGonzales/react,sugarshin/react,orneryhippo/react,TheBlasfem/react,andreypopp/react,cpojer/react,panhongzhi02/react,btholt/react,billfeller/react,thomasboyt/react,glenjamin/react,reactjs-vn/reactjs_vndev,thomasboyt/react,silkapp/react,rasj/react,demohi/react,IndraVikas/react,skyFi/react,nickdima/react,szhigunov/react,sverrejoh/react,glenjamin/react,yut148/react,jquense/react,kamilio/react,ropik/react,reactkr/react,TaaKey/react,concerned3rdparty/react,benchling/react,ArunTesco/react,diegobdev/react,tlwirtz/react,jordanpapaleo/react,empyrical/react,chrismoulton/react,zorojean/react,silkapp/react,yulongge/react,empyrical/react,zorojean/react,reactjs-vn/reactjs_vndev,rohannair/react,lucius-feng/react,sitexa/react,wushuyi/react,camsong/react,jkcaptain/react,framp/react,sekiyaeiji/react,bhamodi/react,rlugojr/react,jkcaptain/react,vipulnsward/react,nLight/react,anushreesubramani/react,kevinrobinson/react,jeffchan/react,jonhester/react,miaozhirui/react,pletcher/react,niole/react,jameszhan/react,psibi/react,nickpresta/react,patrickgoudjoako/react,AlmeroSteyn/react,shergin/react,zofuthan/react,reggi/react,JoshKaufman/react,sdiaz/react,livepanzo/react,bitshadow/react,edmellum/react,bleyle/react,davidmason/react,dgreensp/react,nhunzaker/react,Riokai/react,airondumael/react,scottburch/react,carlosipe/react,ipmobiletech/react,rickbeerendonk/react,alvarojoao/react,arush/react,manl1100/react,acdlite/react,spt110/react,pwmckenna/react,Furzikov/react,manl1100/react,Datahero/react,musofan/react,zeke/react,jmptrader/react,shadowhunter2/react,jedwards1211/react,yiminghe/react,trungda/react,sergej-kucharev/react,Instrument/react,howtolearntocode/react,perterest/react,andrewsokolov/react,vikbert/react,free-memory/react,odysseyscience/React-IE-Alt,BorderTravelerX/react,dgreensp/react,Simek/react,yut148/react,iOSDevBlog/react,leexiaosi/react,jagdeesh109/react,bspaulding/react,anushreesubramani/react,DJCordhose/react,jessebeach/react,Zeboch/react-tap-event-plugin,agileurbanite/react,1234-/react,PrecursorApp/react,easyfmxu/react,VioletLife/react,ramortegui/react,jeffchan/react,garbles/react,Instrument/react,iamchenxin/react,roth1002/react,rricard/react,isathish/react,arkist/react,edmellum/react,mingyaaaa/react,davidmason/react,chinakids/react,perperyu/react,jmacman007/react,linalu1/react,greglittlefield-wf/react,trungda/react,mosoft521/react,ramortegui/react,ABaldwinHunter/react-classic,terminatorheart/react,obimod/react,jakeboone02/react,eoin/react,jquense/react,jameszhan/react,sverrejoh/react,wushuyi/react,KevinTCoughlin/react,alwayrun/react,arasmussen/react,devonharvey/react,tom-wang/react,ms-carterk/react,yangshun/react,terminatorheart/react,stanleycyang/react,JungMinu/react,yangshun/react,huanglp47/react,BreemsEmporiumMensToiletriesFragrances/react,levibuzolic/react,chrisbolin/react,Duc-Ngo-CSSE/react,yasaricli/react,vincentnacar02/react,blainekasten/react,howtolearntocode/react,airondumael/react,ninjaofawesome/reaction,insionng/react,framp/react,jorrit/react,james4388/react,silppuri/react,stardev24/react,skevy/react,edvinerikson/react,jimfb/react,lhausermann/react,isathish/react,zs99/react,yiminghe/react,neusc/react,restlessdesign/react,pyitphyoaung/react,negativetwelve/react,tomv564/react,dilidili/react,BreemsEmporiumMensToiletriesFragrances/react,iammerrick/react,zeke/react,ABaldwinHunter/react-engines,zhangwei001/react,gfogle/react,0x00evil/react,jiangzhixiao/react,gfogle/react,diegobdev/react,andreypopp/react,dmitriiabramov/react,quip/react,andrescarceller/react,dustin-H/react,niubaba63/react,obimod/react,jeromjoy/react,brigand/react,TaaKey/react,ABaldwinHunter/react-engines,wudouxingjun/react,angeliaz/react,chenglou/react,livepanzo/react,Jericho25/react,Diaosir/react,iammerrick/react,perterest/react,richiethomas/react,dilidili/react,jessebeach/react,sejoker/react,dustin-H/react,aickin/react,gajus/react,dustin-H/react,yongxu/react,DJCordhose/react,huanglp47/react,nickpresta/react,guoshencheng/react,vipulnsward/react,alexanther1012/react,reggi/react,Galactix/react,facebook/react,dustin-H/react,yisbug/react,nomanisan/react,leeleo26/react,tomocchino/react,yjyi/react,deepaksharmacse12/react,honger05/react,silvestrijonathan/react,szhigunov/react,chenglou/react,wudouxingjun/react,jordanpapaleo/react,STRML/react,tomocchino/react,ropik/react,lonely8rain/react,ericyang321/react,dortonway/react,maxschmeling/react,cpojer/react,jameszhan/react,gleborgne/react,studiowangfei/react,roth1002/react,mohitbhatia1994/react,albulescu/react,rohannair/react,blue68/react,benchling/react,neomadara/react,nhunzaker/react,sasumi/react,JungMinu/react,jeromjoy/react,joshblack/react,hawsome/react,popovsh6/react,slongwang/react,sebmarkbage/react,ABaldwinHunter/react-engines,trueadm/react,AlexJeng/react,obimod/react,wmydz1/react,christer155/react,ameyms/react,lastjune/react,tom-wang/react,iamdoron/react,kchia/react,kay-is/react,ridixcr/react,brian-murray35/react,jfschwarz/react,odysseyscience/React-IE-Alt,algolia/react,billfeller/react,blue68/react,thr0w/react,rickbeerendonk/react,bspaulding/react,1040112370/react,jonhester/react,AlexJeng/react,trellowebinars/react,ashwin01/react,kevinrobinson/react,gold3bear/react,zyt01/react,roth1002/react,dariocravero/react,joon1030/react,bruderstein/server-react,magalhas/react,aickin/react,DJCordhose/react,linqingyicen/react,varunparkhe/react,claudiopro/react,dariocravero/react,miaozhirui/react,silvestrijonathan/react,ZhouYong10/react,zhangwei900808/react,concerned3rdparty/react,supriyantomaftuh/react,miaozhirui/react,joshblack/react,VioletLife/react,thomasboyt/react,supriyantomaftuh/react,JoshKaufman/react,nsimmons/react,pyitphyoaung/react,niole/react,yungsters/react,elquatro/react,Jonekee/react,ABaldwinHunter/react-classic,jdlehman/react,quip/react,LoQIStar/react,ThinkedCoder/react,iamchenxin/react,yhagio/react,ning-github/react,dortonway/react,Riokai/react,ridixcr/react,roylee0704/react,TaaKey/react,edvinerikson/react,orneryhippo/react,VukDukic/react,linmic/react,orzyang/react,thr0w/react,rgbkrk/react,tomocchino/react,skevy/react,VioletLife/react,framp/react,empyrical/react,jmacman007/react,krasimir/react,thr0w/react,lyip1992/react,yulongge/react,acdlite/react,perperyu/react,kevinrobinson/react,cody/react,ThinkedCoder/react,panhongzhi02/react,leohmoraes/react,tomv564/react,gajus/react,ljhsai/react,jorrit/react,wmydz1/react,pze/react,STRML/react,k-cheng/react,mhhegazy/react,facebook/react,yangshun/react,dmitriiabramov/react,laogong5i0/react,Jericho25/react,ridixcr/react,greysign/react,Spotinux/react,rricard/react,S0lahart-AIRpanas-081905220200-Service/react,mfunkie/react,algolia/react,ManrajGrover/react,javascriptit/react,kevinrobinson/react,jedwards1211/react,Spotinux/react,supriyantomaftuh/react,wjb12/react,AmericanSundown/react,concerned3rdparty/react,yungsters/react,brian-murray35/react,zenlambda/react,anushreesubramani/react,ljhsai/react,AmericanSundown/react,ABaldwinHunter/react-classic,nickpresta/react,yasaricli/react,anushreesubramani/react,syranide/react,greglittlefield-wf/react,zilaiyedaren/react,JungMinu/react,AlmeroSteyn/react,chicoxyzzy/react,bitshadow/react,skomski/react,VioletLife/react,microlv/react,tako-black/react-1,mcanthony/react,savelichalex/react,greysign/react,patrickgoudjoako/react,lennerd/react,gregrperkins/react,arkist/react,TheBlasfem/react,ropik/react,jabhishek/react,pwmckenna/react,willhackett/react,mjackson/react,wangyzyoga/react,k-cheng/react,devonharvey/react,salier/react,joaomilho/react,javascriptit/react,yulongge/react,hzoo/react,pswai/react,dgreensp/react,MichelleTodd/react,restlessdesign/react,tarjei/react,joshblack/react,Lonefy/react,sdiaz/react,jessebeach/react,usgoodus/react,BreemsEmporiumMensToiletriesFragrances/react,kaushik94/react,brian-murray35/react,yuhualingfeng/react,mhhegazy/react,jbonta/react,hejld/react,patrickgoudjoako/react,sugarshin/react,jdlehman/react,soulcm/react,andreypopp/react,gajus/react,1234-/react,yiminghe/react,Jyrno42/react,eoin/react,leohmoraes/react,AnSavvides/react,labs00/react,ledrui/react,thr0w/react,KevinTCoughlin/react,TaaKey/react,chacbumbum/react,nhunzaker/react,mcanthony/react,marocchino/react,krasimir/react,STRML/react,trellowebinars/react,KevinTCoughlin/react,zhangwei001/react,inuscript/react,cesine/react,deepaksharmacse12/react,nickpresta/react,chrisjallen/react,Jonekee/react,wzpan/react,nomanisan/react,misnet/react,terminatorheart/react,brillantesmanuel/react,prometheansacrifice/react,it33/react,ArunTesco/react,nhunzaker/react,krasimir/react,mingyaaaa/react,yulongge/react,garbles/react,with-git/react,TheBlasfem/react,yiminghe/react,Rafe/react,mosoft521/react,TaaKey/react,savelichalex/react,concerned3rdparty/react,cesine/react,quip/react,garbles/react,pze/react,flipactual/react,joecritch/react,trueadm/react,rickbeerendonk/react,kamilio/react,perterest/react,mingyaaaa/react,neomadara/react,elquatro/react,evilemon/react,BorderTravelerX/react,mohitbhatia1994/react,mjackson/react,qq316278987/react,STRML/react,jmacman007/react,tarjei/react,gajus/react,jonhester/react,theseyi/react,kevinrobinson/react,vincentism/react,prathamesh-sonpatki/react,zenlambda/react,dgladkov/react,it33/react,brigand/react,k-cheng/react,SpencerCDixon/react,angeliaz/react,jlongster/react,levibuzolic/react,free-memory/react,billfeller/react,andreypopp/react,reactjs-vn/reactjs_vndev,brigand/react,jontewks/react,mcanthony/react,salzhrani/react,cpojer/react,yjyi/react,nickdima/react,zigi74/react,sekiyaeiji/react,ameyms/react,rickbeerendonk/react,jameszhan/react,richiethomas/react,yuhualingfeng/react,gpbl/react,Riokai/react,jsdf/react,zeke/react,tomocchino/react,anushreesubramani/react,afc163/react,hejld/react,gpbl/react,joon1030/react,manl1100/react,AmericanSundown/react,angeliaz/react,jfschwarz/react,maxschmeling/react,musofan/react,kakadiya91/react,iamdoron/react,chippieTV/react,framp/react,jontewks/react,brillantesmanuel/react,algolia/react,rlugojr/react,blainekasten/react,james4388/react,jimfb/react,chrisbolin/react,ropik/react,glenjamin/react,JoshKaufman/react,TylerBrock/react,edvinerikson/react,kaushik94/react,roylee0704/react,jdlehman/react,zs99/react,rohannair/react,jakeboone02/react,conorhastings/react,Jericho25/react,pod4g/react,Nieralyte/react,magalhas/react,Jyrno42/react,afc163/react,bestwpw/react,it33/react,MichelleTodd/react,roth1002/react,juliocanares/react,lina/react,chicoxyzzy/react,1yvT0s/react,felixgrey/react,laskos/react,neusc/react,carlosipe/react,ajdinhedzic/react,Nieralyte/react,kolmstead/react,ericyang321/react,restlessdesign/react,zigi74/react,psibi/react,VioletLife/react,airondumael/react,tomocchino/react,chacbumbum/react,syranide/react,scottburch/react,mcanthony/react,greyhwndz/react,rickbeerendonk/react,devonharvey/react,xiaxuewuhen001/react,jmptrader/react,yasaricli/react,rgbkrk/react,temnoregg/react,yabhis/react,BorderTravelerX/react,facebook/react,chrisjallen/react,ArunTesco/react,Spotinux/react,dmitriiabramov/react,salzhrani/react,vincentism/react,Simek/react,tzq668766/react,livepanzo/react,richiethomas/react,JoshKaufman/react,pandoraui/react,vipulnsward/react,bleyle/react,jzmq/react,dfosco/react,digideskio/react,reactjs-vn/reactjs_vndev,genome21/react,ABaldwinHunter/react-classic,10fish/react,bspaulding/react,gxr1020/react,crsr/react,MichelleTodd/react,jzmq/react,Jyrno42/react,dgladkov/react,linmic/react,savelichalex/react,kamilio/react,kalloc/react,darobin/react,dilidili/react,livepanzo/react,supriyantomaftuh/react,Diaosir/react,mosoft521/react,prometheansacrifice/react,maxschmeling/react,jabhishek/react,jdlehman/react,arasmussen/react,neomadara/react,hejld/react,mgmcdermott/react,aickin/react,mosoft521/react,liyayun/react,kevinrobinson/react,acdlite/react,varunparkhe/react,insionng/react,jsdf/react,ouyangwenfeng/react,Spotinux/react,hejld/react,pandoraui/react,temnoregg/react,yangshun/react,flarnie/react,framp/react,linmic/react,devonharvey/react,davidmason/react,ThinkedCoder/react,laskos/react,studiowangfei/react,afc163/react,ManrajGrover/react,chippieTV/react,wmydz1/react,savelichalex/react,JanChw/react,Diaosir/react,gfogle/react,hzoo/react,niubaba63/react,kaushik94/react,dirkliu/react,joaomilho/react,zenlambda/react,KevinTCoughlin/react,sdiaz/react,demohi/react,vincentism/react,1234-/react,kolmstead/react,thr0w/react,kaushik94/react,cpojer/react,ABaldwinHunter/react-classic,wuguanghai45/react,crsr/react,anushreesubramani/react,magalhas/react,billfeller/react,gpbl/react,gajus/react,shripadk/react,songawee/react,sverrejoh/react,javascriptit/react,ABaldwinHunter/react-engines,temnoregg/react,dirkliu/react,AlexJeng/react,andrerpena/react,alexanther1012/react,arasmussen/react,ridixcr/react,tlwirtz/react,dariocravero/react,shripadk/react,perterest/react,genome21/react,AnSavvides/react,MoOx/react,apaatsio/react,jeffchan/react,ledrui/react,restlessdesign/react,tzq668766/react,afc163/react,wmydz1/react,staltz/react,kolmstead/react,gougouGet/react,pswai/react,Furzikov/react,prathamesh-sonpatki/react,MotherNature/react,phillipalexander/react,dustin-H/react,8398a7/react,RReverser/react,richiethomas/react,gj262/react,dgdblank/react,devonharvey/react,gregrperkins/react,jquense/react,AlexJeng/react,nathanmarks/react,mcanthony/react,bspaulding/react,BreemsEmporiumMensToiletriesFragrances/react,lyip1992/react,kieranjones/react,Lonefy/react,ilyachenko/react,sejoker/react,conorhastings/react,tjsavage/react,dgdblank/react,spt110/react,bruderstein/server-react,tjsavage/react,mjackson/react,restlessdesign/react,negativetwelve/react,ning-github/react,guoshencheng/react,btholt/react,Diaosir/react,jasonwebster/react,yisbug/react,laogong5i0/react,JanChw/react,sitexa/react,with-git/react,brigand/react,MoOx/react,Simek/react,lhausermann/react,claudiopro/react,jorrit/react,1yvT0s/react,chenglou/react,vincentism/react,jquense/react,jbonta/react,felixgrey/react,tzq668766/react,anushreesubramani/react,kay-is/react,bruderstein/server-react,benjaffe/react,jeffchan/react,dfosco/react,lyip1992/react,mhhegazy/react,pletcher/react,AmericanSundown/react,wmydz1/react,Jyrno42/react,albulescu/react,misnet/react,alvarojoao/react,lennerd/react,eoin/react,jakeboone02/react,spicyj/react,shergin/react,TaaKey/react,davidmason/react,bspaulding/react,qq316278987/react,jsdf/react,aickin/react,arush/react,cody/react,cpojer/react,joaomilho/react,RReverser/react,brillantesmanuel/react,andreypopp/react,iOSDevBlog/react,garbles/react,vikbert/react,jeffchan/react,jbonta/react,lonely8rain/react,camsong/react,elquatro/react,gxr1020/react,gitoneman/react,aaron-goshine/react,studiowangfei/react,felixgrey/react,prathamesh-sonpatki/react,tako-black/react-1,zigi74/react,tako-black/react-1,bspaulding/react,odysseyscience/React-IE-Alt,nomanisan/react,temnoregg/react,kchia/react,zyt01/react,wmydz1/react,benchling/react,jordanpapaleo/react,mjackson/react,vjeux/react,free-memory/react,levibuzolic/react,negativetwelve/react,hzoo/react,jedwards1211/react,henrik/react,bitshadow/react,lyip1992/react,jontewks/react,krasimir/react,Rafe/react,10fish/react,dortonway/react,gougouGet/react,flarnie/react,tom-wang/react,nathanmarks/react,chippieTV/react,MotherNature/react,mjackson/react,Furzikov/react,1040112370/react,laogong5i0/react,zhengqiangzi/react,neusc/react,AlexJeng/react,PrecursorApp/react,btholt/react,darobin/react,dirkliu/react,crsr/react,insionng/react,stardev24/react,sverrejoh/react,glenjamin/react,felixgrey/react,ouyangwenfeng/react,claudiopro/react,IndraVikas/react,jiangzhixiao/react,dmatteo/react,jmacman007/react,airondumael/react,mhhegazy/react,trueadm/react,jfschwarz/react,iamchenxin/react,lennerd/react,ManrajGrover/react,JanChw/react,yuhualingfeng/react,JasonZook/react,henrik/react,k-cheng/react,stanleycyang/react,manl1100/react,mohitbhatia1994/react,with-git/react,michaelchum/react,brillantesmanuel/react,jdlehman/react,prometheansacrifice/react,varunparkhe/react,KevinTCoughlin/react,MoOx/react,richiethomas/react,blainekasten/react,vincentnacar02/react,tomocchino/react,zofuthan/react,ajdinhedzic/react,OculusVR/react,sejoker/react,dittos/react,btholt/react,JasonZook/react,10fish/react,zyt01/react,joe-strummer/react,jonhester/react,0x00evil/react,jbonta/react,psibi/react,airondumael/react,with-git/react,digideskio/react,jordanpapaleo/react,yasaricli/react,gold3bear/react,luomiao3/react,ashwin01/react,S0lahart-AIRpanas-081905220200-Service/react,ms-carterk/react,angeliaz/react,odysseyscience/React-IE-Alt,joe-strummer/react,zorojean/react,1234-/react,gitoneman/react,Nieralyte/react,yuhualingfeng/react,jordanpapaleo/react,zorojean/react,bleyle/react,kakadiya91/react,mik01aj/react,marocchino/react,patrickgoudjoako/react,MotherNature/react,1040112370/react,alvarojoao/react,popovsh6/react,ashwin01/react,mjul/react,phillipalexander/react,Instrument/react,mingyaaaa/react,flowbywind/react,guoshencheng/react,andrescarceller/react,bruderstein/server-react,yisbug/react,andrerpena/react,yulongge/react,iOSDevBlog/react,arush/react,krasimir/react,chicoxyzzy/react,Simek/react,edmellum/react,wesbos/react,davidmason/react,easyfmxu/react,DigitalCoder/react,ianb/react,8398a7/react,skomski/react,usgoodus/react,Spotinux/react,mik01aj/react,0x00evil/react,agileurbanite/react,wangyzyoga/react,yabhis/react,rricard/react,k-cheng/react,Simek/react,benchling/react,joe-strummer/react,ljhsai/react,blue68/react,dmatteo/react,cmfcmf/react,isathish/react,huanglp47/react,gpbl/react,edvinerikson/react,sebmarkbage/react,leeleo26/react,albulescu/react,TylerBrock/react,TheBlasfem/react,nhunzaker/react,mhhegazy/react,sitexa/react,salzhrani/react,microlv/react,kakadiya91/react,zenlambda/react,kolmstead/react,kevin0307/react,flarnie/react,nickpresta/react,jmptrader/react,flarnie/react,AnSavvides/react,jlongster/react,ThinkedCoder/react,garbles/react,staltz/react,bhamodi/react,lonely8rain/react,lhausermann/react,kamilio/react,benjaffe/react,zeke/react,ropik/react,glenjamin/react,jdlehman/react,slongwang/react,Rafe/react,silvestrijonathan/react,nLight/react,PeterWangPo/react,silvestrijonathan/react,niubaba63/react,empyrical/react,with-git/react,ilyachenko/react,jlongster/react,dfosco/react,getshuvo/react,salier/react,greyhwndz/react,Jonekee/react,tomocchino/react,bhamodi/react,usgoodus/react,mfunkie/react,mingyaaaa/react,react-china/react-docs,iamdoron/react,zs99/react,thomasboyt/react,vincentism/react,maxschmeling/react,yjyi/react,ramortegui/react,LoQIStar/react,rgbkrk/react,pandoraui/react,soulcm/react,facebook/react,restlessdesign/react,jasonwebster/react,sverrejoh/react,wangyzyoga/react,billfeller/react,JasonZook/react,zhengqiangzi/react,OculusVR/react,ms-carterk/react,manl1100/react,6feetsong/react,chenglou/react,gitoneman/react,kamilio/react,rwwarren/react,yhagio/react,pletcher/react,haoxutong/react,dittos/react,camsong/react,glenjamin/react,jonhester/react,iOSDevBlog/react,ledrui/react,lyip1992/react,jbonta/react,skevy/react,skevy/react,gitignorance/react,eoin/react,conorhastings/react,PeterWangPo/react,agideo/react,pze/react,gregrperkins/react,theseyi/react,spicyj/react,tlwirtz/react,Instrument/react,dgladkov/react,james4388/react,neomadara/react,rricard/react,gpazo/react,zofuthan/react,vipulnsward/react,react-china/react-docs,panhongzhi02/react,joshblack/react,sebmarkbage/react,ning-github/react,joecritch/react,terminatorheart/react,JoshKaufman/react,gregrperkins/react,Galactix/react,IndraVikas/react,sekiyaeiji/react,neomadara/react,joaomilho/react,insionng/react,bestwpw/react,quip/react,psibi/react,ericyang321/react,ABaldwinHunter/react-engines,edvinerikson/react,iamdoron/react,zs99/react,luomiao3/react,sarvex/react,VukDukic/react,cpojer/react,AlmeroSteyn/react,pwmckenna/react,angeliaz/react,VukDukic/react,chrisbolin/react,studiowangfei/react,acdlite/react,jmptrader/react,chicoxyzzy/react,ouyangwenfeng/react,maxschmeling/react,claudiopro/react,rlugojr/react,rgbkrk/react,richiethomas/react,zs99/react,andrerpena/react,spt110/react,dortonway/react,zeke/react,AnSavvides/react,linqingyicen/react,1040112370/react,KevinTCoughlin/react,hzoo/react,pswai/react,laskos/react,chicoxyzzy/react,agideo/react,linmic/react,lhausermann/react,gj262/react,ThinkedCoder/react,jdlehman/react,dmitriiabramov/react,vipulnsward/react,conorhastings/react,haoxutong/react,zhengqiangzi/react,gpazo/react,aaron-goshine/react,hawsome/react,joecritch/react,yongxu/react,iamdoron/react,digideskio/react,theseyi/react,supriyantomaftuh/react,zenlambda/react,tom-wang/react,MoOx/react,1040112370/react,OculusVR/react,jessebeach/react,nhunzaker/react,1yvT0s/react,easyfmxu/react,dustin-H/react,yongxu/react,silvestrijonathan/react,jakeboone02/react,VioletLife/react,alwayrun/react,tomv564/react,mjackson/react,sasumi/react,0x00evil/react,microlv/react,sverrejoh/react,obimod/react,chacbumbum/react,Spotinux/react,easyfmxu/react,camsong/react,chicoxyzzy/react,niole/react,wuguanghai45/react,perterest/react,with-git/react,misnet/react,reactjs-vn/reactjs_vndev,cmfcmf/react,silkapp/react,mgmcdermott/react,zhangwei900808/react,huanglp47/react,MoOx/react,rohannair/react,evilemon/react,songawee/react,shergin/react,sugarshin/react,it33/react,edvinerikson/react,pswai/react,livepanzo/react,savelichalex/react,james4388/react,arkist/react,yuhualingfeng/react,dmatteo/react,concerned3rdparty/react,songawee/react,cinic/react,andrescarceller/react,szhigunov/react,ms-carterk/react,mosoft521/react,rlugojr/react,slongwang/react,qq316278987/react,dilidili/react,dgdblank/react,tywinstark/react,magalhas/react,trueadm/react,laogong5i0/react,patrickgoudjoako/react,Lonefy/react,orneryhippo/react,joecritch/react,dmatteo/react,S0lahart-AIRpanas-081905220200-Service/react,digideskio/react,trellowebinars/react,shergin/react,getshuvo/react,pyitphyoaung/react,AlmeroSteyn/react,scottburch/react,shripadk/react,krasimir/react,apaatsio/react,dgdblank/react,rohannair/react,agileurbanite/react,levibuzolic/react,kchia/react,studiowangfei/react,conorhastings/react,gitoneman/react,ropik/react,flowbywind/react,rwwarren/react,chrisjallen/react,benchling/react,yisbug/react,AlmeroSteyn/react,yangshun/react,0x00evil/react,cody/react,jedwards1211/react,claudiopro/react,dortonway/react,labs00/react,kalloc/react,stanleycyang/react,staltz/react,yungsters/react,sarvex/react,jordanpapaleo/react,arasmussen/react,framp/react,trungda/react,edvinerikson/react,chrisjallen/react,ianb/react,speedyGonzales/react,ipmobiletech/react,lastjune/react,sarvex/react,sejoker/react,empyrical/react,huanglp47/react,dgreensp/react,insionng/react,panhongzhi02/react,RReverser/react,pod4g/react,zofuthan/react,ameyms/react,Lonefy/react,chenglou/react,sebmarkbage/react,TaaKey/react,leohmoraes/react,zigi74/react,dirkliu/react,brigand/react,deepaksharmacse12/react,arkist/react,rgbkrk/react,aaron-goshine/react,zigi74/react,andreypopp/react,chicoxyzzy/react,aaron-goshine/react,ashwin01/react,cody/react,jimfb/react,leeleo26/react,reactkr/react,christer155/react,leexiaosi/react,wzpan/react,pdaddyo/react,liyayun/react,roylee0704/react,isathish/react,terminatorheart/react,apaatsio/react,dgreensp/react,linqingyicen/react,psibi/react,billfeller/react,ssyang0102/react,zhangwei001/react,usgoodus/react,kakadiya91/react,kaushik94/react,roth1002/react,yut148/react,staltz/react,stardev24/react,gpbl/react,joecritch/react,guoshencheng/react,mgmcdermott/react,jlongster/react,sugarshin/react,kay-is/react,honger05/react,zilaiyedaren/react,zenlambda/react,dfosco/react,trellowebinars/react,jzmq/react,andrescarceller/react,ms-carterk/react,wmydz1/react,jessebeach/react,shripadk/react,brigand/react,jonhester/react,inuscript/react,chinakids/react,dittos/react,juliocanares/react,gfogle/react,yongxu/react,xiaxuewuhen001/react,inuscript/react,jameszhan/react,vjeux/react,AlexJeng/react,dmitriiabramov/react,gajus/react,lhausermann/react,ipmobiletech/react,stardev24/react,honger05/react,sergej-kucharev/react,blainekasten/react,carlosipe/react,levibuzolic/react,jimfb/react,zilaiyedaren/react,alexanther1012/react,PrecursorApp/react,chinakids/react,yiminghe/react,vikbert/react,mjul/react,jquense/react,quip/react,negativetwelve/react,wushuyi/react,OculusVR/react,Riokai/react,Flip120/react,Jyrno42/react,ninjaofawesome/reaction,tywinstark/react,S0lahart-AIRpanas-081905220200-Service/react,pandoraui/react,haoxutong/react,iamchenxin/react,DJCordhose/react,ramortegui/react,musofan/react,iammerrick/react,STRML/react,mhhegazy/react,mhhegazy/react,obimod/react,gitoneman/react,Diaosir/react,gpazo/react,cmfcmf/react,Datahero/react,dgdblank/react,thr0w/react,yungsters/react,BreemsEmporiumMensToiletriesFragrances/react,facebook/react,camsong/react,demohi/react,mnordick/react,aaron-goshine/react,popovsh6/react,sasumi/react,arkist/react,mik01aj/react,nickpresta/react,andrewsokolov/react,joshbedo/react,concerned3rdparty/react,zs99/react,silppuri/react,savelichalex/react,rwwarren/react,Jericho25/react,ashwin01/react,lina/react,pdaddyo/react,yisbug/react,joon1030/react,rlugojr/react,nLight/react,vipulnsward/react,ZhouYong10/react,TheBlasfem/react,zhangwei001/react,benjaffe/react,scottburch/react,laskos/react,ZhouYong10/react,chenglou/react,zhangwei900808/react,roth1002/react,laogong5i0/react,pandoraui/react,afc163/react,niole/react,flarnie/react,temnoregg/react,shripadk/react,iOSDevBlog/react,yungsters/react,chippieTV/react,wjb12/react,ridixcr/react,christer155/react,patrickgoudjoako/react,linqingyicen/react,claudiopro/react,zhangwei001/react,jasonwebster/react,jmacman007/react,james4388/react,hawsome/react,gxr1020/react,bitshadow/react,wushuyi/react,jzmq/react,gleborgne/react,magalhas/react,reggi/react,joe-strummer/react,DigitalCoder/react,jbonta/react,laskos/react,digideskio/react,neusc/react,it33/react,TheBlasfem/react,microlv/react,evilemon/react,cpojer/react,kevin0307/react,ssyang0102/react,silvestrijonathan/react,jorrit/react,gleborgne/react,zigi74/react,TaaKey/react,empyrical/react,Furzikov/react,andrewsokolov/react,dittos/react,reactkr/react,reggi/react,hawsome/react,S0lahart-AIRpanas-081905220200-Service/react,gold3bear/react,pyitphyoaung/react,microlv/react,ameyms/react,elquatro/react,trungda/react,sejoker/react,6feetsong/react,Instrument/react,aickin/react,tarjei/react,benchling/react,silkapp/react,jedwards1211/react,pletcher/react,aickin/react,devonharvey/react,cmfcmf/react,IndraVikas/react,venkateshdaram434/react,joshbedo/react,chippieTV/react,christer155/react,lhausermann/react,agideo/react,prometheansacrifice/react,orneryhippo/react,patryknowak/react,PrecursorApp/react,joshbedo/react,tako-black/react-1,wesbos/react,mgmcdermott/react,maxschmeling/react,mfunkie/react,reactkr/react,gold3bear/react,kieranjones/react,AnSavvides/react,chippieTV/react,sugarshin/react,Chiens/react,microlv/react,lennerd/react,tlwirtz/react,1234-/react,1040112370/react,wzpan/react,jakeboone02/react,cinic/react,wuguanghai45/react,mik01aj/react,pdaddyo/react,jsdf/react,gold3bear/react,prometheansacrifice/react,ameyms/react,lucius-feng/react,mtsyganov/react,iammerrick/react,zanjs/react,jquense/react,trungda/react,apaatsio/react,qq316278987/react,pyitphyoaung/react,AnSavvides/react,vincentnacar02/react,inuscript/react,Datahero/react,facebook/react,kalloc/react,cody/react,miaozhirui/react,jameszhan/react,richiethomas/react,howtolearntocode/react,prathamesh-sonpatki/react,kevin0307/react,howtolearntocode/react,pwmckenna/react,nhunzaker/react,thomasboyt/react,alvarojoao/react,kakadiya91/react,TaaKey/react,honger05/react,lina/react,1234-/react,ninjaofawesome/reaction,tako-black/react-1,greysign/react,jameszhan/react,react-china/react-docs,mjackson/react,SpencerCDixon/react,bruderstein/server-react | ---
+++
@@ -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/
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
Copyright (C) 2015 Center for Open Middleware.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
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 agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
*/
'use strict';
var fs = require('fs');
exports.apiInfo = function() {
return {
"swaggerjson" : JSON.parse(fs.readFileSync('./api/swagger.json', 'utf8')),
"host" : "http://localhost:8080"
};
};
| /*
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
This file is part of the Smart Developer Hub Project:
http://www.smartdeveloperhub.org/
Center for Open Middleware
http://www.centeropenmiddleware.com/
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
Copyright (C) 2015 Center for Open Middleware.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
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 agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
*/
'use strict';
var fs = require('fs');
exports.apiInfo = function() {
var aux = JSON.parse(fs.readFileSync('./api/swagger.json', 'utf8'));
return {
"swaggerjson" : aux,
"host" : aux.host
};
};
| 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"
+ "swaggerjson" : aux,
+ "host" : aux.host
};
}; |
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.dest(path.public.main))
.pipe($.duration(name))
.pipe(helper.success(name));
});
| // 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))
.pipe(gulp.dest(path.public.main))
.pipe($.duration(name))
.pipe(helper.success(name));
});
| 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.