Skip to content
This repository was archived by the owner on Aug 24, 2022. It is now read-only.

Commit 1656d90

Browse files
committed
Allow ast-plugin to run in parallel
1 parent e423f9f commit 1656d90

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

ember-cli-build.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
55
module.exports = function(defaults) {
66
let app = new EmberAddon(defaults, {
77
// Add options here
8+
'ember-cli-babel': {
9+
throwUnlessParallelizable: true
10+
}
811
});
912

1013
/*

index.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,26 @@ module.exports = {
6464
},
6565

6666
setupPreprocessorRegistry(type, registry) {
67+
const plugin = this._buildPlugin();
68+
69+
plugin.parallelBabel = {
70+
requireFile: __filename,
71+
buildUsing: '_buildPlugin',
72+
params: {}
73+
};
74+
75+
registry.add('htmlbars-ast-plugin', plugin);
76+
},
77+
78+
_buildPlugin() {
6779
let RemoveConfigurationHtmlComments = require('./lib/plugins/remove-configuration-html-comments');
6880

69-
registry.add('htmlbars-ast-plugin', {
81+
return {
7082
name: 'remove-configuration-html-comments',
7183
plugin: RemoveConfigurationHtmlComments(),
7284
baseDir() {
7385
return __dirname;
7486
}
75-
});
87+
};
7688
}
7789
};

0 commit comments

Comments
 (0)