gulp icon indicating copy to clipboard operation
gulp copied to clipboard

Gulp with 2 async operations depending on each other

Open echonax opened this issue 9 years ago • 1 comments

In Generating a file per folder tutorial (https://github.com/gulpjs/gulp/blob/master/docs/recipes/running-task-steps-per-folder.md)

I think the last line return merge(tasks, root); is wrong.

root is a stream depending on tasks. Hence, main.js and main.min.js are not generated because merge runs these 2 async operations in parallel (https://github.com/dominictarr/event-stream#merge-stream1streamn-or-merge-streamarray, "no ordering will be applied").

Something like .on('end', cb) should be used in my opinion with cb being the root function

echonax avatar Feb 02 '17 08:02 echonax

those 2 streams aren't meant to rely on each other.

phated avatar Feb 02 '17 20:02 phated