Skip to content

Commit

Permalink
Merge pull request #216 from rwjblue/babelify-ember-test-helpers
Browse files Browse the repository at this point in the history
Run ember-test-helpers through Babel.
  • Loading branch information
rwjblue committed Feb 1, 2016
2 parents fe8a624 + 1a3f585 commit a12b831
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions Brocfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@ var resolve = require('resolve');
var concat = require('broccoli-sourcemap-concat');
var Funnel = require('broccoli-funnel');
var mergeTrees = require('broccoli-merge-trees');
var compileES6 = require('broccoli-es6modules');
var jshintTree = require('broccoli-jshint');
var replace = require('broccoli-string-replace');
var gitVersion = require('git-repo-version');
var BabelTranspiler = require('broccoli-babel-transpiler');

function compileES6(tree) {
return new BabelTranspiler(tree, {
loose: true,
moduleIds: true,
modules: 'amdStrict'
});
}

// --- Compile ES6 modules ---

Expand Down Expand Up @@ -46,11 +54,7 @@ var tests = new Funnel('tests', {
});

var main = mergeTrees([deps, lib]);
var es6Main = new compileES6(main, {
esperantoOptions: {
_evilES3SafeReExports: true
}
});
var es6Main = compileES6(main);

main = concat(es6Main, {
inputFiles: ['**/*.js'],
Expand Down Expand Up @@ -88,11 +92,7 @@ var jshintLib = jshintTree(lib);
var jshintTest = jshintTree(tests);

var mainWithTests = mergeTrees([deps, lib, tests, jshintLib, jshintTest]);
var es6MainWithTests = new compileES6(mainWithTests, {
esperantoOptions: {
_evilES3SafeReExports: true
}
});
var es6MainWithTests = compileES6(mainWithTests);

mainWithTests = concat(es6MainWithTests, {
inputFiles: ['**/*.js'],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"devDependencies": {
"bower": "^1.3.12",
"broccoli": "^0.13.0",
"broccoli-es6modules": "^0.4.2",
"broccoli-babel-transpiler": "^5.5.0",
"broccoli-funnel": "^0.1.6",
"broccoli-jshint": "^0.5.3",
"broccoli-merge-trees": "^0.1.4",
Expand Down

0 comments on commit a12b831

Please sign in to comment.