shell-executor
v6.0.1
Published
A small nodejs module to execute shell commands in parallel
Downloads
288
Maintainers
Readme
shell-executor
A small nodejs module to execute shell commands in parallel
Motivation
Heavily inspired by parallelshell. The main reason this module exists is that
parallelshell
was somehow leaving zombie processes. This version will print the command that you can run in case you detect the
program didn't kill all the process it created.
Install
npm i -g shell-executor
Usage
# or sx as it is alias for shell-exec
Usage: shell-exec [options] cmd1, cmd2, ... cmdn
Options:
-d, --dashboard Show the processes in a nice dashboard if space allows it. No more than 9 commands are allowed in this mode. Requires the install of [email protected] and [email protected]
-b, --bail Stop execution as soon as one of the task exit with an exit code different than 0 or an error happened
-o, --sortOutput Sort the stdout and stderr output from the commands
-h, --help Show this help
-v, --version Outputs the version number
-q, --quiet Show only the summary info - default: false
--colored-output Use colored output in logs
--stack if true, uncaught errors will show the stack trace if available
Examples
# execute the npm commands lint, test and watch in parallel
shell-exec 'npm run lint' 'npm run test' 'npm run watch'
Use colored output
# execute the npm commands lint, test and watch in parallel
shell-exec --colored-output 'npm run lint' 'npm run test' 'npm run watch'