javascript - How to run gulp tasks sequentially? -
this question has answer here:
i have few tasks in gulp , of them except 1 run in parallel. let's consider example:
var gulp = require('gulp'); gulp.task('clean', function() {     // clean output folder }); gulp.task('copy1', function() {     // writes stream in output folder }); gulp.task('copy2', function() {     // writes stream in output folder });  gulp.task('default', ['clean', 'copy1', 'copy2']); in example need run copy1 , copy2 in parallel after clean. how can trick?
var runsequence = require('run-sequence'); gulp.task('default', function(callback) {     runsequence('clean', ['copy1', 'copy2'], callback); }); 
Comments
Post a Comment