I would like to run a shell command from gulp, using gulp-shell. I see the following idiom being used the gulpfile.
Is this the idiomatic way to run a c
The new way to do this that keeps console output the same (e.g., with colors):
see: https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options
var gulp = require('gulp');
var spawn = require('child_process').spawn;
gulp.task('my-task', function (cb) {
var cmd = spawn('cmd', ['arg1', 'agr2'], {stdio: 'inherit'});
cmd.on('close', function (code) {
console.log('my-task exited with code ' + code);
cb(code);
});
});