gpt4 book ai didi

javascript - Gulp 调试 - 管道到 process.stdout 给出 TypeError ('invalid data' )

转载 作者:行者123 更新时间:2023-12-03 12:53:52 25 4
gpt4 key购买 nike

我正在尝试调试我编写的 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com