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)

Chapter 4. Configuration of Grunt Tasks

In the previous chapter, an assortment of Grunt tasks were introduced, and information was provided to become familiar with how to obtain plugins as well as the syntax used to add plugins to your project. In this chapter, we will look at the actual installation and configuration of grunt tasks using the Angular Seed project. There will be two main files that we will be focusing closely on: package.json and gruntfile.js. These two files are where the grunt configuration takes place, some of it automatically, such as when we install a plugin and the package.json file is updated, as shown in the examples in Chapter 3, All about Grunt Plugins. Other configuration is completed manually so that plugin behavior can be defined- and customized as per the project's requirements.

  • Reviewing the installation of Grunt tasks

  • Discussing package.json and gruntfile.js

  • Introducing the Grunt API