Answer the question
In order to leave comments, you need to log in
Gulp - Can't run tasks sequentially. What could be wrong?
Task:
1. Make an assembly to the build folder
2. Copy some files from build to the specified folder.
When I run these tasks in turn manually - everything works
gulp build
gulp copy
const runSequence = require("run-sequence");
gulp.task('default', function(cb) {
return runSequence(
'build',
'copy'
cb
);
});
Answer the question
In order to leave comments, you need to log in
in the build and copy tasks, you must definitely do a return. It signals that the task is over (returns a Promise) and you can execute the next one synchronously
. In general, in all feng shui tasks, you need to do return
gulp.task('copy', function () {
return gulp.src('src/**/*.*')
.pipe(gulp.dest('public'))
;
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question