Run scripts in child process.
$ npm install --save scripy
const scripy = require('scripy')
const build = scripy('npm run build')
const start = scripy('npm start')
// if you want to kill each other
build.on('close', () => start.kill())
start.on('close', () => build.kill())
Type: string
The command to excute, it's passed as args to child_process.spawn
.
Type: string
The name to display while loggin messages into the console, default is the parsed script name from command
. eg: npm run build
's scriptName and displayName both are npm
.
Same as scripy()
but using spawn.sync
.
MIT © EGOIST