Purpose of `return` Statement and `callback` Reference in Gulp Task
问题 I was having trouble getting gulp run-sequence to execute both functions that i gave it (it would only execute one of them. I had something like this: gulp.task('wire', function(){ gulp.src('./index.html') .pipe(wiredep()) .pipe(gulp.dest('.')); }); var filesToInject = ['./app/**/*.js', './app/**/*.css']; gulp.task('inject', function (){ var target = gulp.src('./index.html'); var sources = gulp.src(filesToInject, {read: false}); return target.pipe(inject(sources)) .pipe(gulp.dest('.')); });