My Notebook

How to synchronize a Gulp-task that starts multiple streams in a loop

Andreas Rohner

How to create one Gulp-task that depends on another task is well documented in the Gulp API Reference. Gulp offers three options for doing this, namely accept a callback function, return a stream or return a promise. But what if you have a really complex Gulp-task that starts multiple asynchronous streams in a loop and you need to synchronize that with other tasks? Unfortunately there seems to be no simple solution for that at the moment, but I found a reasonable work-around: read more...