In this Post, I am going to Explain where to use gulp rather than how to implement it.

A few months ago I was developing one project which is based on Virtual reality.Indeed it was a big project and I have developed few plugins which plugin on the base development and I need to unit test the plugins then minify all plugins then merge in one file as a min.js.

Of course, all these things do not strike at a time ;) but as time passed and improve application performance I was searching for the solution and I came across gulp.

Gulp solves the problem of repetition. Many of the tasks that web developers find themselves doing over and over on a daily basis can be simplified by becoming automated. Automating repetitive tasks = more time to do non-repetitive tasks = more productivity.

Gulp is a javascript task runner that lets you automate tasks such as…

  • Bundling and minifying libraries and stylesheets.

  • Refreshing your browser when you save a file.(Live Reload).

  • Quickly running unit tests.

  • Running code analysis.

  • Less/Sass to CSS compilation.

  • Copying modified files to an output directory.

The gulp workflow

Below is a common workflow for performing certain build operations.

  • We start by defining a task that we would like to accomplish.

  • Within that task, a desired set of files are loaded into the gulp stream to be processed. (Optional) Once files are in the stream, one or more modifications can be made to the files. Because the streams are processed in memory, no file - system writes to temporary directories between modifications are required.

  • Send the new (possibly modified) files to a specified destination.

So first, the original files go in, we optionally process modifications to the input files, then we copy the result of our stream to a destination directory.

You can find the really good document here. If you are visual learner then you can search video on youtube or hackr.

Tags