Previously, only 16 of the files from the 'templating' dependency were being copied.
I believe this is due to Gulp terminating before all the files had been written.
This refactoring ensures that all streams are complete before gulp exits - you do this by
returning a stream from the task. This is tricky to do if you have multiple streams in a
single task. In this case we use the event-stream merge() function to turn multiple
streams into a single one for returning.
In addition, the clean task is now run using runSequence, which decouples it from the
other tasks so that we don't have to add it as a dependency of every task.
Previously, only 16 of the files from the 'templating' dependency were being copied. I believe this is due to Gulp terminating before all the files had been written.
This refactoring ensures that all streams are complete before gulp exits - you do this by returning a stream from the task. This is tricky to do if you have multiple streams in a single task. In this case we use the event-stream
merge()
function to turn multiple streams into a single one for returning.In addition, the clean task is now run using
runSequence
, which decouples it from the other tasks so that we don't have to add it as a dependency of every task.