Skip to content

Commit 498b697

Browse files
committed
Docs: Add custom metadata info
1 parent 332245a commit 498b697

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,26 @@ Command Line Utility for Gulp
1616
> gulp [flags] tasks
1717
```
1818

19+
## Custom Metadata
20+
21+
When listing tasks with the `gulp -T` command, gulp-cli displays some custom metadata as defined upon task functions. Currently supported properties:
22+
23+
* `task.description` - String of the description to display.
24+
25+
```js
26+
function clean() { ... }
27+
clean.description = 'Cleans up generated files.';
28+
```
29+
30+
* `task.flags` - Object with key/value pairs being flag/description to display.
31+
32+
```js
33+
function build() { ... }
34+
build.flags = {
35+
'--prod': 'Builds in production mode.'
36+
};
37+
```
38+
1939
## Tasks
2040

2141
Tasks can be executed by running `gulp <task> <othertask>`. Just running `gulp` will execute the task you registered called `default`. If there is no `default` task, gulp will error.

0 commit comments

Comments
 (0)