-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #223 from mikrostew/bring-back-parallel
Avoid eagerly requiring plugins and presets
- Loading branch information
Showing
5 changed files
with
64 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
--- | ||
language: node_js | ||
node_js: | ||
- "4" | ||
- "6" | ||
- "8" | ||
- "10" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'use strict'; | ||
|
||
let ParallelApi = require('broccoli-babel-transpiler/lib/parallel-api'); | ||
|
||
module.exports = function terminateWorkerPool() { | ||
// shut down any workerpool that is running at this point | ||
let babelCoreVersion = ParallelApi.getBabelVersion(); | ||
let workerPoolId = 'v1/broccoli-babel-transpiler/workerpool/babel-core-' + babelCoreVersion; | ||
let runningPool = process[workerPoolId]; | ||
|
||
if (runningPool) { | ||
return runningPool.terminate() | ||
.then(() => { | ||
delete process[workerPoolId]; | ||
}); | ||
} else { | ||
return Promise.resolve(); | ||
} | ||
}; |