O'Reilly logo

Grunt Cookbook by Jurie-Jan Botha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Failing a task

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.

Getting ready

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required