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-1807drupal-pl-gulpdt-workflowemulsify-gulpfinance-document-lsfwbsgarlictech-workflows-commongarlictech-workflows-serverjaune-taskskkzoomhot-pepper-logger-interfacegee-buildgrizzly-coregulp-armadillogulp-hot-pepperguanlecojagulp-crometricsgulp-add-tasksgulp-add-tasks2gulp-config-apsisgulp-conventional-releasegulp-babel-tasksgulp-babelatorgulp-atomsgulp-clearbuildgulp-tasks-bootstrapgulp-tasks-loadergulp-testgulp-powerbi-package-validatorgulp-patterngulp-ignitegulp-workflowid-builderimago-gulp-angularlight-scriptsliferay-plugin-node-tasksliferay-theme-tasks-themeletmodern-web-dev-buildlinx-semantic-uiload-common-gulp-tasksnode-build-web-app@rdcl/frameworkportal-theme-taskspowerbi-visuals-package-validator@patternkit/pk-build-copy-fonts@patternkit/pk-build-svgstore@pegakit/build-toolsparchedpairin-gulpnodewrite-core-assetspegakit-build-tools@otixo/semantic-uione-calculatoroneagency-ocelot@nwetzel/modern-web-dev-buildnw-gulp-taskspresskite-semanticreaktorape-gulpscad-builderscad-builder-projsiasemantic-ui-xyzsemantic-ui-happysemui-onyxsearch_auto_completesecret-service1000-packages@aligent/frontend-toolkitangular-buildazk-devtest-angualrjs-componentsurvivejscarrefour-themetest-runner-scaffolderspoonx-tools@cleverage/gskbiggulpchronimitko-policysn-semantic-uibangerbe-goodsbase-gulp-frameworkbabelatorsnaphy-web-themeaym-gulpstaminadecorator-helpersvanilla-semantic-ui@ekolabs/project-kit@fourkitchens/emulsify-gulpvaccine-docoolwindwalker-fusion@ianbytchek/guild
1.6.1

9 years ago

1.6.0

9 years ago

1.5.2

9 years ago

1.5.1

9 years ago

1.5.0

9 years ago

1.4.0

9 years ago

1.3.4

9 years ago

1.3.3

9 years ago

1.3.2

9 years ago

1.3.1

9 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

10 years ago

0.1.6

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago