Skip to content

Commit

Permalink
Fix for parallel babel
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthi Ravi Shankar committed Sep 18, 2018
1 parent bdd2fda commit f3c1aec
Show file tree
Hide file tree
Showing 4 changed files with 482 additions and 612 deletions.
5 changes: 4 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
let app = new EmberAddon(defaults, {
// Add options here
// This can be uncommented when babel parallelization works for ember-font-awesome
/* 'ember-cli-babel': {
throwUnlessParallelizable: true,
}, */
});

/*
Expand Down
24 changes: 17 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,26 @@ module.exports = {

setupPreprocessorRegistry(type, registry) {
if (this.shouldPolyfill) {
registry.add('htmlbars-ast-plugin', {
name: 'component-attributes',
plugin: require('./lib/ast-transform'),
baseDir() {
return __dirname;
},
});
let pluginObj = this._buildPlugin();
pluginObj.parallelBabel = {
requireFile: __filename,
buildUsing: '_buildPlugin',
params: {}
}
registry.add("htmlbars-ast-plugin", pluginObj);
}
},

_buildPlugin() {
return {
name: 'component-attributes',
plugin: require('./lib/ast-transform'),
baseDir() {
return __dirname;
}
};
},

included() {
this._super.included.apply(this, arguments);

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"test:all": "ember try:each"
},
"dependencies": {
"ember-cli-babel": "^6.6.0",
"ember-cli-babel": "^6.17.0",
"ember-cli-version-checker": "^2.1.2",
"ember-compatibility-helpers": "^1.0.0"
"ember-compatibility-helpers": "^1.0.2"
},
"devDependencies": {
"broccoli-asset-rev": "^2.7.0",
Expand Down
Loading

0 comments on commit f3c1aec

Please sign in to comment.