A CLI tool to run multiple npm-scripts in parallel or sequential.
09507bcd326da38aa6e099e700fb5e659a4f17a7 added supporting $npm_config_xxx
(fixes #60)
npm run-script
command has supported --name=value
style options. This style options make environment variables $npm_config_name
(%npm_config_name%
on Windows), then we can use those environment variables in npm-scripts. Now npm-run-all
also got supports of the --name=value
style options and $npm_config_name
variables.
For examples:
{
"scripts": {
"echo": "echo $npm_config_foo"
}
}
$ npm run echo --foo=777
777
$ npm-run-all echo --foo=888
888
Breaking Changes (and new features):
run-s "foo {1}"
is evaluated to run-s "foo "
). Until v2.3.0, the {1}
is remained.run-s "start -- --port={1:=3000}"
). This notation is similar to Shell Parameters. Currently, npm-run-all
is supporting {parameter:-word}
and {parameter:=word}
.Features:
--race
option for a parallel execution. (#42)npm-run-all
kills other scripts. This is useful in order to run a test server and a test runner in parallel.Upgrade Dependencies:
Upgrade dependencies:
Features:
Upgrade:
4.0.0
.Upgrade:
cross-spawn-async
to cross-spawn
(fixes #40).cross-spawn-async
has been deprecated.Features:
Node API came to give results of child processes. See also: https://github.com/mysticatea/npm-run-all/blob/master/docs/node-api.md
runAll(["clean", "lint", "build"])
.then(results => {
console.log(`${results[0].name}: ${results[0].code}`); // clean: 0
console.log(`${results[1].name}: ${results[1].code}`); // lint: 0
console.log(`${results[2].name}: ${results[2].code}`); // build: 0
});
Features:
npm-run-all
to cover most use cases.
Breaking Changes:
--continue-on-error
option has been changed the behavior. On 1.x, if the option was specified, npm-run-all
command exited with 0
. But on 2.0.0, even if the option was specified, npm-run-all
command will exit with a non-zero code if a npm-script exited with a non-zero code.--print-label
, --print-name
, and --continue-on-error
options have been changed the behavior. On 1.x, the effect of those options was applied to only one script group. But on 2.0.0, the effect of those options will be applied to whole a command.npm-run-all -s aaa bbb -p ccc ddd --print-label
, in this case the command has 2 script group, aaa bbb
and ccc ddd
. Then, on 1.x, --print-label
will effect to only ccc ddd
. On the other hand, on 2.0.0, --print-label
will effect to all of aaa
, bbb
, ccc
, and ddd
.-S
and -P
shorthand options have been removed. Please use originating options: -c
and -c -p
.