“Understanding flow control is what makes you a programmer” – Gulp, The Stream Build System
So gulp is another of those ‘things’ that I keep coming across when I’m reading the interwebs on AngularJS, NodeJS, etc. So, trying to be a diligent student, I decided to do some research on what the heck it is. I came across this really interesting/helpful slideshow and video on Gulp.
New concepts for me:
- Think of my application as a series of tubes/streams; not as a big machine
Large applications should be broken down to small components, that do one thing well
Gulp Functions Notes:
Register a function with a name, and specify dependencies if other tasks need to run first
Runs all tasks
Runs a function when a file that matches the glob changes
Returns a readable stream. Takes a file system glob and starts emitting files that match. Piped to other streams.
Returns a writable stream. File objects piped to this are saved to the file system.