# gulp-help

> Adds a default help task to gulp and provides the ability to add custom help messages to your gulp tasks

Latest version **1.6.1** (published 2015-08-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-help
pnpm add gulp-help
yarn add gulp-help
bun add gulp-help
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.6.1 |
| Published | 2015-08-25 |
| First published | 2014-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/gulp-help) |
| Module format | CommonJS |
| Node | >= 0.10 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 126 |
| Author | Chris Montgomery |
| Maintainers | chmontgomery |
| Keywords | gulp, help, tasks, list, gulpfriendly |

## Links

- npm: https://www.npmjs.com/package/gulp-help
- Repository: https://github.com/chmontgomery/gulp-help
- Homepage: https://github.com/chmontgomery/gulp-help#readme
- Issues: https://github.com/chmontgomery/gulp-help/issues
- npm.io page: https://npm.io/package/gulp-help

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) ^1.0.0
- [object-assign](https://npm.io/package/object-assign.md) ^3.0.0

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.6.1 (latest) — 2015-08-25
- 1.6.0 — 2015-06-07
- 1.5.2 — 2015-06-07
- 1.5.1 — 2015-06-07
- 1.5.0 — 2015-06-06
- 1.4.0 — 2015-06-06
- 1.3.4 — 2015-03-15
- 1.3.3 — 2015-02-06
- 1.3.2 — 2015-02-01
- 1.3.1 — 2014-12-01
- 1.3.0 — 2014-10-20
- 1.2.0 — 2014-10-03
- 1.1.0 — 2014-09-02
- 1.0.0 — 2014-09-01
- 0.1.11 — 2014-07-15
- … 17 more at https://npm.io/package/gulp-help/versions

## README

# [gulp](https://github.com/gulpjs/gulp)-help [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
> Adds a default help task to gulp and provides the ability to add custom help messages to your gulp tasks

## Install

```bash
$ npm install --save-dev gulp-help
```

## Usage

Before defining any tasks, add `gulp help` to your gulp instance

```js
// gulpfile.js
var gulp = require('gulp-help')(require('gulp'));
```

Next, define help text for each custom task

```js
// gulpfile.js
gulp.task('lint', 'Lints all server side js', function () {
    gulp.src('./lib/**/*.js')
      .pipe(jshint());
});
```

Now show that help via `gulp help`

![](screenshot.png)

## New task API

### gulp.task(name[, help, deps, fn, taskOptions])

#### [name](https://github.com/gulpjs/gulp/blob/master/docs/API.md#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`

```js
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](https://github.com/gulpjs/gulp/blob/master/docs/API.md#deps)

Type: `Array`

#### [fn](https://github.com/gulpjs/gulp/blob/master/docs/API.md#fn)

Type: `function`

#### taskOptions.aliases

Type: `Array`

List of aliases for this task

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

which results in

![](screenshot-aliases.png)

#### taskOptions.options

Type: `Object`

Object documenting options which can be passed to your task

```js
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

![](screenshot-options.png)

## 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](http://www.chrismontgomery.info/)

[npm-url]: https://npmjs.org/package/gulp-help
[npm-image]: http://img.shields.io/npm/v/gulp-help.svg
[travis-image]: https://travis-ci.org/chmontgomery/gulp-help.svg?branch=master
[travis-url]: https://travis-ci.org/chmontgomery/gulp-help

---
_Source: https://npm.io/package/gulp-help · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
