Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.11 KB

api.md

File metadata and controls

57 lines (42 loc) · 1.11 KB
var cjsTasks = require('gulp-commonjs-tasks');
var taskLoader = cjsTasks.taskLoader;
var taskInfo = cjsTasks.taskInfo;

taskLoader

You can also retrieve this object directly.

var taskLoader = require('gulp-commonjs-tasks/task-loader');

taskLoader.load(taskDir, gulp, args...)

The return value of taskLoader.load() is an object which contains the following keys.

{
  taskNames: [ list of task names ],
  defaultTaskNames: [ list of default task names ],
  addHelpTask: [ adds a help task ],
  taskTree: [ Function: returns all tasks ],
  cliHelp: [ Function: returns formatted help string ]
}

taskInfo

You can also retrieve this object directly.

var taskInfo = require('gulp-commonjs-tasks/task-info');

taskInfo(gulp)

{
  cliHelp: [ Function: returns formatted help string ],
  taskTree: [ Function: returns all tasks ]
}
cliHelp(options)
{
  a: [ boolean: wether or not to display tasks without descriptions ],
  all: [ boolean: wether or not to display tasks without descriptions ]
}
taskTree()

Returns flattened tree of all tasks.