Skip to content

Commit

Permalink
Docs: Add example of -T/--tasks and --tasks-simple
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxRules authored and phated committed Dec 31, 2017
1 parent 8aa1022 commit c1012cd
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,75 @@ Just running `gulp` will execute the task `default`. If there is no
### 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] │ └─┬ <series>
[20:58:55] │ ├── one
[20:58:55] │ └── two
[20:58:55] ├─┬ five
[20:58:55] │ └─┬ <series>
[20:58:55] │ ├─┬ four
[20:58:55] │ │ └─┬ <series>
[20:58:55] │ │ ├── one
[20:58:55] │ │ └── two
[20:58:55] │ └─┬ <parallel>
[20:58:55] │ ├── three
[20:58:55] │ └── <anonymous>
```

### `--tasks-simple`

Command: `gulp --tasks-simple`

Output:
```shell
one
two
three
four
five
```

0 comments on commit c1012cd

Please sign in to comment.