Interface CommonTaskModule

{@link http://gruntjs.com/api/grunt.task}

Hierarchy

Index

Methods

Methods

public registerMultiTask(taskName: string, taskFunction: Function)

Register a "multi task." A multi task is a task that implicitly iterates over all of its named sub-properties (AKA targets) if no target was specified. In addition to the default properties and methods, extra multi task-specific properties are available inside the task function as properties of the this object.

note

taskFunction.apply(scope: grunt.task.IMultiTask, args: any[])

Parameters

  • taskName: string
  • taskFunction: Function

public registerMultiTask(taskName: string, taskDescription: string, taskFunction: Function)

Parameters

  • taskName: string
  • taskDescription: string
  • taskFunction: Function

public registerTask(taskName: string, taskList: Array<string>)

If a task list is specified, the new task will be an alias for one or more other tasks. Whenever this "alias task" is run, every specified task in taskList will be run, in the order specified. The taskList argument must be an array of tasks.

Parameters

  • taskName: string
  • taskList: Array<string>

public registerTask(taskName: string, description: string, taskFunction: Function)

If a description and taskFunction are passed, the specified function will be executed whenever the task is run.

In addition, the specified description will be shown when grunt --help is run. Task-specific properties and methods are available inside the task function as properties of the this object. The task function can return false to indicate that the task has failed.

note

taskFunction.apply(scope: grunt.task.ITask, args: any[])

Parameters

  • taskName: string
  • description: string
  • taskFunction: Function