Reputation: 225
I'm trying to execute something using gulp-shell
. My gulfile.js
contains the following content:
var gulp = require('gulp'),
shell = require('gulp-shell');
gulp.task('test', function() {
shell(['echo test']);
});
Then I run it calling gulp test
. This is the output I get:
Using gulpfile ~/gulpfile.js
Starting 'test'...
Finished 'test' after 2.62 ms
There's no output for my echo call.
I'm using an Ubuntu 14 VM
that I connected to, using Putty
.
Anyone got an idea what's wrong?
Upvotes: 9
Views: 9521
Reputation: 8048
For the record, if you want to pipe gulp-shell, per specified in the doc:
gulp.task('myGulpTask', [], function() {
return gulp.src('gulpfile.js', {read: false})
.pipe(shell('echo "This works too"'));
});
Upvotes: 4
Reputation: 3056
That's because it's not the good way to use gulp-shell.
Try this, as seen in the gulp-shell README.
var gulp = require('gulp'),
shell = require('gulp-shell');
gulp.task('test', shell.task([
'echo test'
]));
Upvotes: 18