angular / projects

github reference application for Angular 2.0
57 stars 34 forks source link

chore(gulp): refactor tasks to ensure all files are copied #4

Closed petebacondarwin closed 10 years ago

petebacondarwin commented 10 years ago

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.

petebacondarwin commented 10 years ago

Closes #3