1 | # gulp-help [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
|
2 | > Adds help task to [gulp](https://github.com/gulpjs/gulp) and the ability to provide help text to your custom gulp tasks
|
3 |
|
4 | ## Install
|
5 |
|
6 | ```bash
|
7 | $ npm install --save-dev gulp-help
|
8 | ```
|
9 |
|
10 | ## Usage
|
11 |
|
12 | Before defining any tasks, add `gulp help` to the gulp instance
|
13 |
|
14 | ```js
|
15 | // gulpfile.js
|
16 | require('gulp-help')(gulp);
|
17 | ```
|
18 |
|
19 | Next, define help text for each task
|
20 |
|
21 | ```js
|
22 | // gulpfile.js
|
23 | gulp.task('lint', 'Lints all server side js', function () {
|
24 | gulp.src('./lib/**/*.js')
|
25 | .pipe(jshint(jshintrcPath))
|
26 | .pipe(jshint.reporter(stylish))
|
27 | .pipe(jshint.reporter('fail'));
|
28 | });
|
29 | ```
|
30 |
|
31 | Now show that help via `gulp help`
|
32 |
|
33 | ```bash
|
34 | $ gulp help
|
35 | [gulp] Running 'help'...
|
36 |
|
37 | Usage:
|
38 | gulp [task]
|
39 |
|
40 | Available tasks:
|
41 | help Display this help text
|
42 | lint Lints all server side js
|
43 |
|
44 | [gulp] Finished 'help' in 607 μs
|
45 | ```
|
46 |
|
47 | ## License
|
48 |
|
49 | [MIT](http://opensource.org/licenses/MIT) © [Chris Montgomery](http://www.chrismontgomery.info/)
|
50 |
|
51 | [npm-url]: https://npmjs.org/package/gulp-help
|
52 | [npm-image]: http://img.shields.io/npm/v/gulp-help.svg
|
53 | [travis-image]: https://travis-ci.org/chmontgomery/gulp-help.svg?branch=master
|
54 | [travis-url]: https://travis-ci.org/chmontgomery/gulp-help
|