npm-run-parallel
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -18,10 +18,20 @@ 'use strict'; | ||
var runTask = function runTask(task) { | ||
var _exec = (0, _child_process.exec)('npm run ' + task); | ||
var addExitOnInterrupt = function addExitOnInterrupt(taskProcess) { | ||
return process.on('SIGINT', taskProcess.kill); | ||
}; /* eslint-disable no-console */ | ||
var stdout = _exec.stdout; | ||
var stderr = _exec.stderr; | ||
var executeTask = function executeTask(task) { | ||
var taskProcess = (0, _child_process.exec)('npm run ' + task); | ||
addExitOnInterrupt(taskProcess); | ||
return taskProcess; | ||
}; | ||
var createOutputStreamsFromProcess = function createOutputStreamsFromProcess(_ref) { | ||
var stdout = _ref.stdout; | ||
var stderr = _ref.stderr; | ||
var stdoutStream = _rxNode2.default.fromReadableStream(stdout); | ||
var stderrStream = _rxNode2.default.fromReadableStream(stderr).select(function (e) { | ||
@@ -32,4 +42,9 @@ return process.stderr.write(e) && process.exit(1); | ||
return stdoutStream.merge(stderrStream); | ||
}; /* eslint-disable no-console */ | ||
}; | ||
var runTask = function runTask(task) { | ||
var taskProcess = executeTask(task); | ||
return createOutputStreamsFromProcess(taskProcess); | ||
}; | ||
var runTasks = exports.runTasks = function runTasks(tasks) { | ||
@@ -36,0 +51,0 @@ _rx.Observable.from(tasks).selectMany(runTask).subscribe(function (output) { |
{ | ||
"name": "npm-run-parallel", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"description": "Run npm tasks in parallel and exit when they are all done.", | ||
@@ -5,0 +5,0 @@ "bin": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5646
53