我正在使用官方gulp存储库中的recipe,以使browserify适用于多个入口点。当我按照单个文件的方法运行时,它运行得很好,但是当我现在尝试运行该任务时,它打印出
the following tasks did not complete: browserify.
Did you forget to signal async completion?不幸的是。为此,我使用了Gulp 4。这是我改编的任务:
gulp.task('browserify', function() {
var bundledStream = through();
bundledStream.pipe(source('./public/static/js-dev/bundles/*.js'))
.pipe(buffer())
.pipe(sourcemaps.init({loadMaps: true}))
.on('error', gutil.log)
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(local.jsDist+'/bundles'));
globby(['./public/static/js-dev/bundles/*.js'], function(err, entries) {
if (err) {
bundledStream.emit('error', err);
return;
}
var b = browserify({
entries: entries,
debug: true
});
b.bundle().pipe(bundledStream);
});
return bundledStream;
});我不知道我做错了什么--我只想让它正常工作。
发布于 2017-05-12 02:05:38
你需要回调函数中的任务zo add to作为参数,最后在你的函数中作为done ()调用它;
https://stackoverflow.com/questions/43544046
复制相似问题