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


Grunt is a JavaScript task runner whose purpose is task automation. Using automation, developers can find benefits through improved productivity, error reduction, and reduced workload of mundane tasks. You learned that Grunt has some dependencies that need to be installed before we can begin using Grunt in our projects. Grunt requires that Node.js and the NPM be installed so that we can install the Grunt CLI, which we will use to install Grunt. It wasn't necessary to get too deep into the understanding of Node.js and NPM at this point; we only needed to have a high-level understanding of the technologies in order to help us get the Grunt CLI up and running.

Some plugins were mentioned, such as contrib-watch, contrib-jshint, and contrib-uglify, that will be used later to illustrate task configuration to automate our workflows. As you perform your daily development activities, perhaps you can identify the repetition of certain tasks. Imagine being able to automate these tasks; with Grunt, you could write your own plugin to do just this. You could even share it with others by contributing it as an unofficial Grunt plugin.

The next chapter will cover the creation of an application that will be used for examples throughout the remainder of this book. This will involve using an application scaffold, which will generate an AngularJS application. This will allow the rapid setting up of the environment needed to write, build, and run the Grunt automated tasks that will be covered in later chapters.