我正在尝试调试我编写的 Gulp 任务。我尝试使用 'gulp-debug'
模块,但它真正做的只是统计一个文件...这对我没有用。
对于初学者,我怎样才能让进程进入终端?我想看看 wiredep
正在输出什么。我尝试了 .pipe(process.stdout)
但我得到了 TypeError('invalid data')
。
var bowerStream = gulp.src('./app/bower_components')
.pipe(wiredep())
.pipe(process.stdout)
最佳答案
使用 through2这是可能的:
gulp.src('./app/index.html')
.pipe(wiredep({directory: './app/bower_components'}))
.pipe(through2.obj(function(obj, enc, next) {
this.push(obj.contents);
next();
})).pipe(process.stdout);
关于javascript - Gulp 调试 - 管道到 process.stdout 给出 TypeError ('invalid data' ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26639468/