Book Image

Learning Grunt

By : Douglas Reynolds
Book Image

Learning Grunt

By: Douglas Reynolds

Overview of this book

With the increasing focus on task automation, the Grunt task runner is a vast platform that allows you to incorporate automation into your workflows. At the outset, you will learn how to use Node.js and NMP through an example. You will then find out how to build a sample app and the development environment for it. You will further delve into the implementation of Grunt plugins and the configuration of Grunt tasks. Furthermore, you will explore the various methods and packages for workflow automation. The final chapter will cover some advanced concepts, such as configuration variables and how to create a Grunt plugin. By the end of the book, you will have gained the fundamentals of Grunt and progressed through advanced concepts, including building a Grunt plugin.
Table of Contents (15 chapters)

Summary


In this chapter, we looked at the installation and configuration of Grunt tasks. Focus was placed on two main files in a Grunt project: package.json and Gruntfile.js. As we discovered, the setup process was recorded in package.json as we installed our tasks. You learned about properties and objects that are contained in package.json and discussed the purpose of these properties. The majority of configuration is accomplished in Gruntfile.js. In this file, we encapsulated everything in a wrapper function so that we could export the contents of the file as a module. The main sections of Gruntfile.js consisted of the wrapper function, configuration, task loading, and task registration/custom task creation. After the discussion of Gruntfile.js details, we went deeper into the Grunt API. In this section, we discussed what the Grunt API is and covered specific methods of the API for different types of purposes, for instance, the log API and task API.

In Chapter 5, Task Setup in the sample_project...