Answer the question
In order to leave comments, you need to log in
How to make async in gulp thread?
Here is an example
gulp.src('style/*.css').pipe(minify()).dest('www/style')
Answer the question
In order to leave comments, you need to log in
Make an async function in which you get a list of files, create a promise for each file and minify it, then wait for all the promises to be fulfilled.
Well, do not forget to make a wrapper for it so that it can be passed to pipe.
Do return gulp.src(....).
I will add to my comment: I understood why I had no doubts about asynchrony, I always wrote like this
return gulp.src(paths.files.src).pipe(........).pipe(gulp.dest(paths.build));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question