Skip to content

Instantly share code, notes, and snippets.

View thomasboyt's full-sized avatar

Thomas Boyt thomasboyt

View GitHub Profile
@thomasboyt
thomasboyt / 1_es6.js
Last active August 29, 2015 13:57
cycles sadness
// a.js
import odd from './b';
export default function even(n) {
return n === 0 || odd(n - 1);
}
// b.js
import even from './a';
Built with error:
Error: Path or pattern "jquery.js" did not match any files
at Object.multiGlob (/Users/thomasboyt/venmo-code/ember-shabu/node_modules/broccoli-es6-concatenator/node_modules/broccoli-kitchen-sink-helpers/index.js:171:13)
at ES6Concatenator.transform (/Users/thomasboyt/venmo-code/ember-shabu/node_modules/broccoli-es6-concatenator/index.js:57:31)
at /Users/thomasboyt/venmo-code/ember-shabu/node_modules/broccoli-es6-concatenator/node_modules/broccoli-transform/index.js:15:19
at invokeCallback (/Users/thomasboyt/Code/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/promise.js:228:21)
at publish (/Users/thomasboyt/Code/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/promise.js:176:9)
at publishFulfillment (/Users/thomasboyt/Code/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/promise.js:312:5)
at flush (/Users/thomasboyt/Code/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/asap.js:41:9)
at process._tickCallback (node.js:415:13)
// start test run, once Require.js is done
require(['sinon'], function(sinon) {
mocha.setup({ globals: ['XMLHttpRequest', 'jQuery*'] });
/* snip some more stub code */
// load all of my spec files...
var requireTest = require.context('./spec', true, /^spec_.*\.js$/);
// and require them to run
requireTest.keys().forEach(require);
var Filter = require('broccoli-filter');
var compile = require('es6-arrow-function').compile;
module.exports = ArrowFunctionFilter;
ArrowFunctionFilter.prototype = Object.create(Filter.prototype);
ArrowFunctionFilter.prototype.constructor = ArrowFunctionFilter;
function ArrowFunctionFilter (inputTree, options) {
if (!(this instanceof ArrowFunctionFilter)){
if (typeof __es6_module_registry__ === "undefined") {
__es6_module_registry__ = {};
}
var __es6_module__ = {
"__es6_transpiled__": true
}
__es6_module_registry__["tmp"] = module.exports = __es6_module__;
var __imports_0__ = __es6_module_registry__["expect"] || require("expect");
/* jshint node: true */
var Filter = require('broccoli-filter');
var compile = require('es6-module-transpiler').compile;
var _ = require('underscore');
var fs = require('fs');
var path = require('path');
var q = require('q');
/* jshint node: true */
/**
* This is a hack-ish way of triggering Karma runs on broccoli builds.
*/
var path = require('path');
var spawn = require('child_process').spawn;
var broccoli = require('broccoli');
class Foo {
static myStaticMethod {
return true;
}
}
class Bar extends Foo {
static myStaticMethod {
return super();
}
var fs = require('fs');
var q = require('q');
var path = require('path');
var Filter = require('broccoli-filter');
var transforms = ['es6-arrow-function', 'es6-class'];
module.exports = ES6TransformFilter;