1.6.1 • Published 9 years ago

gulp-help v1.6.1

Weekly downloads
22,278
License
MIT
Repository
github
Last release
9 years ago

gulp-help NPM version Build Status

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

npm.io

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

npm.io

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

npm.io

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

@crivas/ute-ui@phparkle/semantic-ui@mygooder/semantic@infinitebrahmanuniverse/nolb-gulp-h@everything-registry/sub-chunk-1807test-angualrjs-componentwindwalker-fusionsemantic-ui-happysemantic-ui-xyzsemui-onyxscad-builderscad-builder-projreaktorspoonx-toolssearch_auto_completesecret-servicetest-runner-scaffoldervaccine-vanilla-semantic-uioneagency-ocelotliferay-theme-tasks-themeletliferay-plugin-node-tasksload-common-gulp-taskslinx-semantic-uilight-scriptsgrizzly-corejaune-tasksid-builderkkzoomguanlecojahot-pepper-logger-interfaceimago-gulp-angulargulp-hot-peppergulp-powerbi-package-validatorgulp-patterngulp-atomsgulp-config-apsisgulp-conventional-releasegulp-clearbuildgulp-workflowgulp-tasks-bootstrapgulp-testgulp-tasks-loadergulp-babel-tasksgulp-babelatorgulp-add-tasksgulp-add-tasks2gulp-ignitegulp-armadillogulp-crometricsnodewrite-core-assetspairin-gulpparchedpowerbi-visuals-package-validatorportal-theme-tasksnw-gulp-tasksone-calculatorpresskite-semanticnode-build-web-appmodern-web-dev-buildpegakit-build-toolsstaminasn-semantic-uisnaphy-web-themesurvivejssiatko-policy@aligent/frontend-toolkit@cleverage/gsk1000-packages@fourkitchens/emulsify-gulp@ianbytchek/guild@ekolabs/project-kit@rdcl/framework@patternkit/pk-build-copy-fonts@patternkit/pk-build-svgstore@nwetzel/modern-web-dev-build@otixo/semantic-ui@pegakit/build-toolsdecorator-helperschronimidocooldrupal-pl-gulpdt-workflowfinance-document-lsfwbsgarlictech-workflows-commongarlictech-workflows-serveremulsify-gulpgee-buildaym-gulpazk-devangular-buildape-gulpbase-gulp-frameworkbangerbiggulpbe-goodsbabelatorcarrefour-theme
1.6.1

9 years ago

1.6.0

10 years ago

1.5.2

10 years ago

1.5.1

10 years ago

1.5.0

10 years ago

1.4.0

10 years ago

1.3.4

10 years ago

1.3.3

10 years ago

1.3.2

10 years ago

1.3.1

10 years ago

1.3.0

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago

0.1.11

10 years ago

0.1.10

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.7

11 years ago

0.1.6

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.8

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago