diff --git a/README.md b/README.md index 6cc96248..fb5e60cd 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,26 @@ Command Line Utility for Gulp > gulp [flags] tasks ``` +## Custom Metadata + +When listing tasks with the `gulp -T` command, gulp-cli displays some custom metadata as defined upon task functions. Currently supported properties: + +* `task.description` - String of the description to display. + +```js +function clean() { ... } +clean.description = 'Cleans up generated files.'; +``` + +* `task.flags` - Object with key/value pairs being flag/description to display. + +```js +function build() { ... } +build.flags = { + '--prod': 'Builds in production mode.' +}; +``` + ## Tasks Tasks can be executed by running `gulp `. Just running `gulp` will execute the task you registered called `default`. If there is no `default` task, gulp will error.