Check for duplicates in the stream and filter them or throw an error(evacuated from NSA/Microsoft Github)
anonymous c5fdd06e9e packaging to the correct directory | 6 anos atrás | |
---|---|---|
debian | 6 anos atrás | |
examples | 9 anos atrás | |
lib | 9 anos atrás | |
.editorconfig | 9 anos atrás | |
.gitattributes | 9 anos atrás | |
.gitignore | 10 anos atrás | |
.jshintrc | 10 anos atrás | |
.npmignore | 9 anos atrás | |
.travis.yml | 9 anos atrás | |
index.js | 9 anos atrás | |
license | 9 anos atrás | |
package.json | 9 anos atrás | |
readme.md | 6 anos atrás | |
screenshot-aliases.png | 9 anos atrás | |
screenshot-options.png | 9 anos atrás | |
screenshot.png | 9 anos atrás | |
test.js | 9 anos atrás |
Adds a default help task to gulp and provides the ability to add custom help messages to your gulp tasks
NOTE: this version only works with gulp 3.
Apparently there's a gulp-help
that works with gulp 4, somewhere, please help us find it and
help us get a copy, by creating an issue
Before defining any tasks, add gulp help
to your gulp instance
// gulpfile.js
var gulp = require('gulp-help')(require('gulp'));
Next, define help text for each custom task
// gulpfile.js
gulp.task('lint', 'Lints all server side js', function () {
gulp.src('./lib/**/*.js')
.pipe(jshint());
});
Now show that help via gulp help
Type: string
Type: string | boolean
Custom help message as a string.
If you want to hide the task from the help menu, supply false
gulp.task('task-hidden-from-help', false, function () {
// ...
});
However, if the --all
flag is provided, even these tasks will be shown. (i.e. gulp help --all
)
Type: Array
Type: function
Type: Array
List of aliases for this task
gulp.task('version', 'prints the version.', [], function() {
// ...
}, {
aliases: ['v', 'V']
});
which results in
Type: Object
Object documenting options which can be passed to your task
gulp.task('version', 'prints the version.', [], function () {
// ...
}, {
options: {
'env=prod': 'description of env, perhaps with available values',
'key=val': 'description of key & val',
'key': 'description of key'
}
});
which results in
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 runsMIT © Chris Montgomery