8000 Docs: Add example of -T/--tasks and --tasks-simple · gulpjs/gulp@c1012cd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit c1012cd

Browse files
SyntaxRulesphated
authored andcommitted
Docs: Add example of -T/--tasks and --tasks-simple
1 parent 8aa1022 commit c1012cd

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

docs/CLI.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,75 @@ Just running `gulp` will execute the task `default`. If there is no
4141
### Compilers
4242

4343
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.
44+
45+
### Examples
46+
47+
#### Example gulpfile
48+
49+
```js
50+
gulp.task('one', function(done) {
51+
// do stuff
52+
done();
53+
});
54+
55+
gulp.task('two', function(done) {
56+
// do stuff
57+
done();
58+
});
59+
60+
gulp.task('three', three);
61+
62+
function three(done) {
63+
done();
64+
}
65+
three.description = "This is the description of task three";
66+
67+
gulp.task('four', gulp.series('one', 'two'));
68+
69+
gulp.task('five',
70+
gulp.series('four',
71+
gulp.parallel('three', function(done) {
72+
// do more stuff
73+
done();
74+
})
75+
)
76+
);
77+
```
78+
79+
### `-T` or `--tasks`
80+
81+
Command: `gulp -T` or `gulp --tasks`
82+
83+
Output:
84+
```shell
85+
[20:58:55] Tasks for ~\exampleProject\gulpfile.js
86+
[20:58:55] ├── one
87+
[20:58:55] ├── two
88+
[20:58:55] ├── three This is the description of task three
89+
[20:58:55] ├─┬ four
90+
[20:58:55] │ └─┬ <series>
91+
[20:58:55] │ ├── one
92+
[20:58:55] │ └── two
93+
[20:58:55] ├─┬ five
94+
[20:58:55] │ └─┬ <series>
95+
[20:58:55] │ ├─┬ four
96+
[20:58:55] │ │ └─┬ <series>
97+
[20:58:55] │ │ ├── one
98+
[20:58:55] │ │ └── two
99+
[20:58:55] │ └─┬ <parallel>
100+
[20:58:55] │ ├── three
101+
[20:58:55] │ └── <anonymous>
102+
```
103+
104+
### `--tasks-simple`
105+
106+
Command: `gulp --tasks-simple`
107+
108+
Output:
109+
```shell
110+
one
111+
two
112+
three
113+
four
114+
five
115+
```

0 commit comments

Comments
 (0)
0