@@ -43,7 +43,16 @@ Type: `string`
43
43
Type: ` string | boolean `
44
44
45
45
Custom help message as a string.
46
- If you want to hide the task from the help menu, supply ` false ` .
46
+
47
+ If you want to hide the task from the help menu, supply ` false `
48
+
49
+ ``` js
50
+ gulp .task (' task-hidden-from-help' , false , function () {
51
+ // ...
52
+ });
53
+ ```
54
+
55
+ However, if the ` --all ` flag is provided, even these tasks will be shown. (i.e. ` gulp help --all ` )
47
56
48
57
#### [ deps] ( https://github.com/gulpjs/gulp/blob/master/docs/API.md#deps )
49
58
@@ -57,23 +66,7 @@ Type: `function`
57
66
58
67
Type: ` Array `
59
68
60
- List of aliases for this task.
61
-
62
- ## Hide Tasks
63
-
64
- You can optionally hide a target from showing up in the help menu by passing ` false ` as the help argument, e.g.
65
-
66
- ``` js
67
- gulp .task (' task-hidden-from-help' , false , function () {
68
- // ...
69
- });
70
- ```
71
-
72
- However, if the ` --all ` flag is provided, even these tasks will be shown. (i.e. ` gulp help --all ` )
73
-
74
- ## Aliases
75
-
76
- You can optionally add aliases to your targets by supplying an object with an aliases array, e.g.
69
+ List of aliases for this task
77
70
78
71
``` js
79
72
gulp .task (' version' , ' prints the version.' , [], function () {
@@ -87,9 +80,11 @@ which results in
87
80
88
81
![ ] ( screenshot-aliases.png )
89
82
90
- ## Options
83
+ #### taskOptions.options
84
+
85
+ Type: ` Object `
91
86
92
- You can optionally pass options to your targets by supplying an object with an options object, e.g.
87
+ Object documenting options which can be passed to your task
93
88
94
89
``` js
95
90
gulp .task (' version' , ' prints the version.' , [], function () {
@@ -106,44 +101,15 @@ which results in
106
101
107
102
![ ] ( screenshot-options.png )
108
103
109
- ## Override default help message
110
-
111
- ``` js
112
- require (' gulp-help' )(require (' gulp' ), { description: ' you are looking at it.' , aliases: [' h' , ' ?' ] });
113
- ```
114
-
115
- Then, calling
116
-
117
- ``` shell
118
- $ gulp # or
119
- $ gulp help # or
120
- $ gulp h # or
121
- $ gulp ?
122
- ```
123
-
124
- will now result in
125
-
126
- ![ ] ( screenshot-override-default.png )
104
+ ## require('gulp-help')(require('gulp'), options);
127
105
128
- ## Post -help callback
106
+ These are all the options available to be passed to the ` gulp -help` instance, NOT individual tasks.
129
107
130
- You can define a function to run after the default help task runs.
131
-
132
- ``` js
133
- require (' gulp-help' )(gulp, {
134
- afterPrintCallback : function (tasks ) {
135
- console .log (tasks);
136
- }
137
- });
138
- ```
139
-
140
- ## Hide task dependencies
141
-
142
- By default, the dependencies of a task will be listed behind its help message. To hide them:
143
-
144
- ``` js
145
- require (' gulp-help' )(require (' gulp' ), {hideDepsMessage: true });
146
- ```
108
+ - ` description ` - modifies the default help message
109
+ - ` aliases ` - adds aliases to the default help task
110
+ - ` hideEmpty ` - hide all tasks with no help message defined. Useful when including 3rd party tasks
111
+ - ` hideDepsMessage ` - hide all task dependencies
112
+ - ` afterPrintCallback ` - a function to run after the default help task runs
147
113
148
114
## License
149
115
0 commit comments