connectivedx / Phoenix

http://connectivedx.github.io/Phoenix/
33 stars 5 forks source link

Implement Watchify for js bundling. #189

Open krambuhl opened 8 years ago

krambuhl commented 8 years ago

Browserify doesn't have a caching mechanism built in, so when running the build-watch build process, javascript edits take 2-4s to completely bundle. Watchify solves this issue by caching and rebuilding only the files that have changed.

This is a straightforward change, but because of how watchify is architected, the gulp task must be configured in a non-gulp-standard way. Whereas the browserify task can call the gulp.task async callback in the standard way, the watchify task continues to run after the gulp.task finished, watching for file changes.