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...