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

Chapter 8. Creating Custom Tasks

In this chapter, we will cover the following recipes:

  • Creating an alias task
  • Creating a basic task
  • Accessing project configuration
  • Checking for required configurations
  • Checking for the successful execution of other tasks
  • Running non-blocking code in a task
  • Failing a task
  • Using command-line parameters
  • Enqueuing tasks to run
  • Creating a multi-task
  • Using options in a task
  • Using files in a task

Introduction

To truly begin appreciating the power and flexibility of Grunt, we have to delve into the creation of our own tasks.

On top of the vast array of plugins at our disposal, each of the tasks provided by them can be configured in a variety of ways that should cover most of our requirements. If, however, we do encounter a problem we ...

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