spawn-run
You can execute commands in node_modules/.bin/
like npm run, return child_process.
Installation
npm install spawn-run --save-dev
Usage
var spawnRun = require('spawn-run')
var child = spawnRun(command, [options])
command
like exec, and options
like child_process.spawn, return child_process
Example
var spawnRun = require('spawn-run');
var child = spawnRun('echo "Hello spawn" | base64');
child.stdout.on('data', function (data) {
console.log('data', data);
});
child.on('exit', function (exitCode) {
console.log('exit', exitCode);
});