Chapter 1, Introducing Grunt, explains exactly what Grunt is and why we would
want to use it. Then, instead of starting at the very beginning, we temporarily jump
ahead to review a set of real-world examples. This gives us a glimpse of what
Grunt can do, which will help us to see how we could use Grunt in our current
development workflow.
Chapter 2, Setting Up Grunt, after finishing our forward escapade, we jump back to
the very beginning and start with the two primary technologies surrounding Grunt:
Node.js and its package manager—npm. Then, we proceed to installing each of
these tools and setting up our first Grunt environment. Next, we learn about the
package.json and Gruntfile.js files and how they are used to configure a Grunt
build. We will also cover the various Grunt methods used for configuration and the
types of situations where each is useful.
Chapter 3, Using Grunt, extends on what we learned in the previous chapter, to the
use and creation of tasks that consume our freshly made configuration. We will cover
tasks, multitasks, and asynchronous tasks. We look in-depth into the task object and
how we can use it effectively to perform common file-related actions. Finally, we
review running Grunt tasks and methods that customize Grunt execution to
our benefit.
Chapter 4, Grunt in Action, begins with an empty folder and gradually constructs a
Grunt environment for a web application. Throughout this process, we use various
examples from Chapter 1, Introducing Grunt, make use of the configuration strategies
from Chapter 2, Setting Up Grunt, and include some extra features from Chapter 3,
Using Grunt. At the end of this chapter, we shall be left with a Grunt environment
that compiles and optimizes our CoffeeScript, Jade, and Stylus, and deploys our
resulting web application to Amazon's S3.
Chapter 5, Advanced Grunt, introduces some of the more advanced use cases for
Grunt; these introductions are intended to be purely an entry to each topic while
providing the resources to learn more. We briefly cover testing with Grunt, Grunt
plugins, advanced JavaScript, development tools and more.