You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+38-31Lines changed: 38 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,23 @@
1
-
> Find something missing? [Open an issue](open-an-issue)
1
+
> Found something wrong or missing? [Open an issue!](open-an-issue)
2
+
3
+
The module comes with two static methods
4
+
5
+
[Gulp.create](#gulpcreate) -
6
+
[Gulp.createClass](#gulpcreateclass)
7
+
8
+
and the same [gulp API][gulp-api] methods we know and love
9
+
10
+
[gulp.src](#gulptask) -
11
+
[gulp.dest](#gulptask) -
12
+
[gulp.task](#gulptask) -
13
+
[gulp.watch](#gulptask)
14
+
15
+
and 4 more to bundle/run tasks
16
+
17
+
[gulp.start](#gulpstart) -
18
+
[gulp.stack](#gulpstack) -
19
+
[gulp.series](#gulpseries) -
20
+
[gulp.parallel](#gulpparallel)
2
21
3
22
# documentation
4
23
@@ -12,10 +31,10 @@
12
31
-[Instance methods](#instance-methods)
13
32
-[gulp.task](#gulptask)
14
33
-[gulp.start](#gulpstart)
15
-
-[async composers](#async-composers)
16
-
-[gulp.series](#gulpseries)
17
-
-[gulp.parallel](#gulpparallel)
18
-
-[gulp.stack](#gulpstack)
34
+
-[async composers](#async-composers)
35
+
-[gulp.series](#gulpseries)
36
+
-[gulp.parallel](#gulpparallel)
37
+
-[gulp.stack](#gulpstack)
19
38
-[CLI](#cli)
20
39
-[REPL](#repl)
21
40
@@ -25,7 +44,9 @@
25
44
26
45
1. Install `npm install --save-dev gulp-runtime`
27
46
28
-
2. Open a `gulpfile`, or [create one][example-gulpfile], and change this line
47
+
2. Open a `gulpfile`, or [create one][example-gulpfile], and
48
+
49
+
change this line
29
50
30
51
```js
31
52
var gulp =require('gulp');
@@ -45,34 +66,22 @@
45
66
46
67
Thats it! When no arguments are given after `gulpfile` the `default` task will run instead.
47
68
48
-
3. What about the CLI? Can I run `gulp` from the terminal?
69
+
3. What about the CLI? Can I just run `gulp-runtime` from the terminal?
49
70
50
-
Yes. Just add an alias line to your `.bashrc`/`.zshrc`
71
+
Yes. Just add an alias to your `.bashrc`/`.zshrc`
51
72
52
73
```sh
53
74
alias gulp-runtime='node $(find . -name "gulpfile.js" -not -path "./node_modules/*" | head -n1)'
54
75
```
55
76
56
-
which will run the first `gulpfile.js` found excluding `node_moduldes`. Open a new terminal tab and then you can do
77
+
which will use the first `gulpfile.js` found excluding `node_modules`.
78
+
79
+
Open a new terminal tab and then
57
80
58
81
`gulp-runtime --tasks default watch serve`
59
82
60
83
## API
61
84
62
-
The module comes with the same [gulp API][gulp-api] methods we know and love
63
-
64
-
[gulp.src](#gulptask) -
65
-
[gulp.dest](#gulptask) -
66
-
[gulp.task](#gulptask) -
67
-
[gulp.watch](#gulptask)
68
-
69
-
and 4 more
70
-
71
-
[gulp.start](#gulpstart) -
72
-
[gulp.stack](#gulpstack) -
73
-
[gulp.series](#gulpseries) -
74
-
[gulp.parallel](#gulpparallel)
75
-
76
85
### Static methods
77
86
78
87
When you require the module
@@ -93,7 +102,7 @@ function create(Object options)
93
102
94
103
- `options.log = true` if `false` the instance will have no logging
95
104
- `options.repl = false` no REPL by default
96
-
- `options.wait = false` tasks run in __parallel__ by default. Pass `wait: true` to run tasks in __series__ by default
105
+
- `options.wait = false` tasks run in __parallel__ by default. Pass `wait: true` to make __series__ the default when running tasks
97
106
98
107
#### Gulp.createClass
99
108
@@ -119,13 +128,11 @@ var Gulp = require('gulp-runtime').createClass({
119
128
}
120
129
})
121
130
122
-
module.exports= Gulp;
131
+
exports=module.exports= Gulp;
123
132
```
124
133
125
134
### Instance methods
126
135
127
-
You can split builds into instances within the same process and run them separately.
128
-
129
136
#### gulp.task
130
137
131
138
`gulp.src`, `gulp.dest`, `gulp.watch` and `gulp.task` behaves the same as described in the [`gulp` API documentation][gulp-api].
@@ -218,13 +225,13 @@ gulp.task('default', function (done) {
218
225
});
219
226
```
220
227
221
-
### async composers
228
+
####async composers
222
229
223
230
`gulp.start` just runs tasks which is not enough when you only need to compose them. For this reason we need another function that will bundle and run a set of tasks only when called.
224
231
225
232
Just as tasks dependencies bundles into one task others, we have 3 async composer functions to help with this (in fact there is only one function and two others are sugar on top).
226
233
227
-
#### gulp.series
234
+
#####gulp.series
228
235
229
236
```js
230
237
functionseries(tasks...[, Objectoptions])
@@ -234,7 +241,7 @@ function series(tasks...[, Object options])
234
241
235
242
Its sugar on top of [`gulp.stack`][#gulpstack] to force the tasks to be run in series.
236
243
237
-
#### gulp.parallel
244
+
##### gulp.parallel
238
245
239
246
```js
240
247
function parallel(tasks...[, Object options])
@@ -244,7 +251,7 @@ function parallel(tasks...[, Object options])
244
251
245
252
Its sugar on top of [`gulp.stack`][#gulpstack] to force the tasks to be run in series.
0 commit comments