run-commands
v0.1.1
Published
Cross-platform running a series of commands or in parallel flow. Run commands in OS X, Linux and even Windows!
Downloads
390
Readme
run-commands
Cross-platform running a series of commands or in parallel flow. Run commands in OS X, Linux and even Windows!
Install
npm i run-commands --save
Usage
For more use-cases see the tests
const runCommands = require('run-commands')
runCommands
Run commands in series by default, pass
options.parallel: true
to run them on parallel.
Params
cmd
{String|Array}args
{String|Array|Object|Function=}options
{Object|Function=}callback
{Function}returns
{Stream}
.series
Run commands in series. Alias for
runCommands
.
Params
cmd
{String|Array}args
{String|Array|Object|Function=}options
{Object|Function=}callback
{Function}returns
{Stream}
.parallel
Run commands in parallel.
Params
cmd
{String|Array}args
{String|Array|Object|Function=}options
{Object|Function=}callback
{Function}returns
{Stream}
Signatures
runCommands(String, String, Object, Function)
runCommands(String, Array, Object, Function)
runCommands(String, Object, Function)
runCommands(String, Function)
runCommands(Array<String|Object>, Object, Function)
runCommands(Array<String|Object>, Function)
Related
- async: Higher-order functions and common patterns for asynchronous code | homepage
- capture-spawn: Asynchronously capturing spawn output. | homepage
- capture-stream: Capture stream output. | homepage
- cross-spawn: Cross platform child_process#spawn and child_process#spawnSync | homepage
- cross-spawn-async: Cross platform child_process#spawn | homepage
- function-arguments: Get arguments of a function, useful for and used in dependency injectors.… more | homepage
- parse-arguments: Parse function to object with same key names as arguments names and… more | homepage
- spawn-commands: Launches a new process with the given command, with command line arguments… more | homepage
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.