In a npm script

```sh

Commands format

The command file is a collection of commands, each command being defined by a "command key" used for output, and the command to run.

Short format

You can declare your commands as an object of string, as a more compact format:

{

"js":"npm run build-js",

"hello":"echo hello"

}

All commands are run concurrently, if any command fails the global execution is terminated with a non-zero status code.

If your command has parameters with whitespace, you cannot use this format. For example, { "commit": "git commit -m 'commit message'" } will try to execute git commit -m "'commit" "message'", which is absolutely wrong.

Whitespace in parameters: longer format

You can declare your command as an array, each part being a parameter of your command. Everything will be escaped transparently:

{

"hello-world":["echo","hello, world"],

"commit":["git","commit","-m","commit message"]

}

Fine-grained flow control: full format

The full format (originally the only one supported) lets you control the way you react to the end of any command. In this case the commands are an array of arrays, each one having the following members:

(optional) is the command required?

true the master will exit as soon as this command dies (normally or not)

false the master will ignore death of this command (normal or not)

otherwise (set to null if you want to be explicit) default behavior for the master is to exit if command dies with non-0 exit code