gulp-help
Adds a default help task to gulp and provides the ability to add custom help messages to your gulp tasks
Install
$ npm install --save-dev gulp-help
Usage
Before defining any tasks, add gulp help
to your gulp instance
// gulpfile.jsvar gulp = ;
Next, define help text for each custom task
// gulpfile.jsgulp;
Now show that help via gulp help
New task API
gulp.task(name[, help, deps, fn, taskOptions])
name
Type: string
help
Type: string | boolean
Custom help message as a string.
If you want to hide the task from the help menu, supply false
gulp;
However, if the --all
flag is provided, even these tasks will be shown. (i.e. gulp help --all
)
deps
Type: Array
fn
Type: function
taskOptions.aliases
Type: Array
List of aliases for this task
gulp;
which results in
taskOptions.options
Type: Object
Object documenting options which can be passed to your task
gulp;
which results in
require('gulp-help')(require('gulp'), options);
These are all the options available to be passed to the gulp-help
instance, NOT individual tasks.
description
- modifies the default help messagealiases
- adds aliases to the default help taskhideEmpty
- hide all tasks with no help message defined. Useful when including 3rd party taskshideDepsMessage
- hide all task dependenciesafterPrintCallback
- a function to run after the default help task runs
License
MIT © Chris Montgomery