I would like to run a shell command from gulp, using gulp-shell. I see the following idiom being used the gulpfile.
gulp-shell
Is this the idiomatic way to run a c
You could simply do this:
const { spawn } = require('child_process'); const gulp = require('gulp'); gulp.task('list', function() { const cmd = spawn('ls'); cmd.stdout.on('data', (data) => { console.log(`stdout: ${data}`); }); return cmd; });