我想使用gulp通过Unix管道对shell命令执行某些操作,并且gulp-run看起来不错,但已经过时了(https://github.com/MrBoolean/gulp-run/issues/52)。
有什么办法吗?
var run = require('gulp-run');
// use gulp-run in the middle of a pipeline:
gulp.task('even-lines', function() {
return gulp
.src('path/to/input/*') // get input files.
.pipe(run('awk "NR % 2 == 0"')) // use awk to extract the even lines.
.pipe(gulp.dest('path/to/output')) // profit.
;
});
// Error: Received a non-Vinyl object in `dest()`