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 hace 6 años
debian c5fdd06e9e packaging to the correct directory hace 6 años
examples e84dcf883b add hideEmpty option. Fixes #8 hace 9 años
lib 2488d80227 check for null values hace 9 años
.editorconfig c394082df1 add editor files hace 9 años
.gitattributes c394082df1 add editor files hace 9 años
.gitignore 4f0d2ae806 allow tasks will only deps. Fixes #12 hace 10 años
.jshintrc 3e3614f1e9 add tests and linting hace 10 años
.npmignore dc047a0115 reduce npm footprint by only shipping the essentials hace 9 años
.travis.yml 762c0bb0d8 fix travis test config hace 9 años
index.js e84dcf883b add hideEmpty option. Fixes #8 hace 9 años
license 683dcb30ae add license hace 9 años
package.json 93aca6896f :clap: new contributor hace 9 años
readme.md 15db8f5212 gulp hace 6 años
screenshot-aliases.png f5f914d33d update readme, now with screenshots hace 9 años
screenshot-options.png f5f914d33d update readme, now with screenshots hace 9 años
screenshot.png f5f914d33d update readme, now with screenshots hace 9 años
test.js 1382c74b45 average perf increase of 23.8% hace 9 años

readme.md

gulp-help

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

Usage

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

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.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)

deps

Type: Array

fn

Type: function

taskOptions.aliases

Type: Array

List of aliases for this task

gulp.task('version', 'prints the version.', [], function() {
  // ...
}, {
  aliases: ['v', 'V']
});

which results in

taskOptions.options

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

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 message
  • aliases - adds aliases to the default help task
  • hideEmpty - hide all tasks with no help message defined. Useful when including 3rd party tasks
  • hideDepsMessage - hide all task dependencies
  • afterPrintCallback - a function to run after the default help task runs

License

MIT © Chris Montgomery