Book Image

Learning Underscore.js

By : Alexandru Vasile Pop
Book Image

Learning Underscore.js

By: Alexandru Vasile Pop

Overview of this book

Table of Contents (14 chapters)
Learning Underscore.js
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Build automation with Gulp


So far, all the examples that targeted the browser environment took more effort to configure and execute compared with the examples targeting Node.js. The lack of a dynamic module system is one of the reasons for all the additional steps, and it may take a while until all the major browsers will natively support ES6 modules.

Another important consideration is the need to reduce the number of resource requests when deploying to the browser environment and usually this is accomplished through file concatenation using a build automation tool (also known as a build system or a task runner). Many server-side web application frameworks already have their own build systems, such as Rake for the programming language Ruby, while JavaScript has its own build systems powered by Node.js. Two of the more popular ones are Grunt (http://gruntjs.com/) and Gulp.js (http://gulpjs.com). We will use Gulp in this chapter to automate some manual tasks from one of our previous examples...