in node's package.json I would like to reuse a command that I already have in a 'script'.
Here is the practical example
instead of (note the extra -w on the watch script):
"scripts": {
"test" : "./node_modules/mocha/bin/mocha --compilers coffee:coffee-script/register --recursive -R list",
"watch": "./node_modules/mocha/bin/mocha --compilers coffee:coffee-script/register --recursive -R list -w",
}
I would like to have something like
"scripts": {
"test" : "./node_modules/mocha/bin/mocha --compilers coffee:coffee-script/register --recursive -R list",
"watch": "npm run script test" + "-w",
}
which doesn't work (can't do string concats in json), but you should get what I would like
I know that npm scripts support: - & (parallel execution) - && (sequencial execution)
so maybe there is another option?