Automation with Gulp

In the previous chapters, we have set up Git, a sample application, and some tests. However, while Git, or source control in general, and tests are very important for successful CI, perhaps the most important part is automation. You can write hundreds of tests, but if a programmer forgets to run them (or knowingly refuses to do so), those tests become pretty useless. The same goes for other tasks, such as linting and minifying your code. Later, when you need to release your application to a live environment, the human factor is your number one concern; one wrong move and the entire application goes down! For this reason, it is important to automate all the things.

When it comes to automating your HTML, CSS, and JavaScript tasks, there are two popular contenders for the job: Grunt (https://gruntjs.com/) and Gulp (http://gulpjs.com/). Both are labelled as JavaScript task runners. Grunt has been around a little while longer and is widely used. However, it has some issues that Gulp is supposed to address. Unfortunately, Gulp also introduces some new issues that Grunt does not have. Overall, the choice between Grunt or Gulp is pretty much a personal preference. However, in this chapter, we are going to work with Gulp.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.254.118