From 37635568a6a58dc99eb8b306609dff7966a13550 Mon Sep 17 00:00:00 2001 From: Devyn Stott Date: Wed, 8 Apr 2015 21:08:00 -0700 Subject: [PATCH] docs(cli): Add example of -T --tasks and --tasks-simple Add example of -T --tasks and --tasks-simple No Breaking changes --- docs/CLI.md | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/docs/CLI.md b/docs/CLI.md index 92840fbee..0c15c262b 100644 --- a/docs/CLI.md +++ b/docs/CLI.md @@ -24,3 +24,75 @@ Tasks can be executed by running `gulp `. Just running `gulp` ### Compilers You can find a list of supported languages at [interpret](https://github.com/tkellen/node-interpret#jsvariants). If you would like to add support for a new language send pull request/open issues there. + +### Examples + +#### Example gulpfile + +```js +gulp.task('one', function(done) { + // do stuff + done(); +}); + +gulp.task('two', function(done) { + // do stuff + done(); +}); + +gulp.task('three', three); + +function three(done) { + done(); +} +three.description = "This is the description of task three"; + +gulp.task('four', gulp.series('one', 'two')); + +gulp.task('five', + gulp.series('four', + gulp.parallel('three', function(done) { + // do more stuff + done(); + }) + ) +); +``` + +### `-T` or `--tasks` + +Command: `gulp -T` or `gulp --tasks` + +Output: +```shell +[20:58:55] Tasks for ~\exampleProject\gulpfile.js +[20:58:55] ├── one +[20:58:55] ├── two +[20:58:55] ├── three This is the description of task three +[20:58:55] ├─┬ four +[20:58:55] │ └─┬ +[20:58:55] │ ├── one +[20:58:55] │ └── two +[20:58:55] ├─┬ five +[20:58:55] │ └─┬ +[20:58:55] │ ├─┬ four +[20:58:55] │ │ └─┬ +[20:58:55] │ │ ├── one +[20:58:55] │ │ └── two +[20:58:55] │ └─┬ +[20:58:55] │ ├── three +[20:58:55] │ └── +``` + +### `--tasks-simple` + +Command: `gulp --tasks-simple` + +Output: +```shell +one +two +three +four +five +```