What is Gulp - A Streaming Build System

gulp

“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 – The Streaming Build System

Gulp – by TagTree Screen Shot 2015-10-28 at 9.40.21 AM

Gulp Functions Notes:

gulp.task(name, fn)

Register a function with a name, and specify dependencies if other tasks need to run first

gulp.run(tasks...)

Runs all tasks

gulp.watch(glob, fn)

Runs a function when a file that matches the glob changes

gulp.src(glob)

Returns a readable stream. Takes a file system glob and starts emitting files that match. Piped to other streams.

gulp.dest(folder)

Returns a writable stream. File objects piped to this are saved to the file system.

Duncan Leung

Front End Developer at iHerb.com

Irvine, CA

Subscribe to Duncan Leung: Javascript and Front End Development

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!