The success or failure of a task can be used to indicate whether a task was completed without issue, or if a problem was encountered before it could perform its intended function. By default, Grunt will assume that a task has succeeded but it also provides us with a simple way to indicate whether a task has failed and pass on the reason for its failure.
In this example, we'll work with the basic project structure we created in the Installing Grunt on a project recipe in Chapter 1, Getting Started with Grunt. Be sure to refer to it if you are not yet familiar with its contents.
If any of the steps in this recipe seem hard to follow, be sure to check out the Accessing project configuration recipe provided earlier in this chapter.