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/API.md
+24-12Lines changed: 24 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,8 @@ The following expression matches `a.js` and `bad.js`:
38
38
39
39
40
40
Note that globs are evaluated in order, which means this is possible:
41
-
```
41
+
42
+
```js
42
43
// exclude every JS file that starts with a b except bad.js
43
44
gulp.src(['*.js', '!b*.js', 'bad.js'])
44
45
```
@@ -106,6 +107,7 @@ emits globbed files.
106
107
107
108
##### options.allowEmpty
108
109
Type: `Boolean`
110
+
109
111
Default: `false`
110
112
111
113
When true, will allow singular globs to fail to match. Otherwise, globs which are only supposed to match one file (such as `./foo/bar.js`) will cause an error to be thrown if they don't match.
[File stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) object when available.
563
-
Setting the `alwaysStat` option to true will ensure that a file stat object will be
572
+
[File stats][fs stats] object when available.
573
+
Setting the `alwaysStat` option to `true` will ensure that a file stat object will be
564
574
provided.
565
575
566
576
#### watcher methods
@@ -578,12 +588,13 @@ Watch additional glob (or array of globs) with an already-running watcher instan
578
588
Stop watching a glob (or array of globs) while leaving the watcher running and
579
589
emitting events for the remaining paths it is watching.
580
590
591
+
581
592
### gulp.tree(options)
582
593
583
594
Returns the tree of tasks. Inherited from [undertaker]. See the [undertaker docs for this function](https://github.com/phated/undertaker#treeoptions--object).
584
595
585
596
#### options
586
-
Type: Object
597
+
Type: `Object`
587
598
588
599
Options to pass to [undertaker].
589
600
@@ -592,7 +603,7 @@ Type: `Boolean`
592
603
593
604
Default: `false`
594
605
595
-
If set to true whole tree should be returned.
606
+
If set to `true` whole tree should be returned.
596
607
597
608
#### Example gulpfile
598
609
@@ -725,12 +736,13 @@ gulp.tree({ deep: true })
725
736
*/
726
737
```
727
738
739
+
728
740
### gulp.registry([registry])
729
741
730
742
Get or set the underlying task registry. Inherited from [undertaker]; see the undertaker documention on [registries](https://github.com/phated/undertaker#registryregistryinstance). Using this, you can change registries that enhance gulp in different ways. Utilizing a custom registry has at least three use cases:
-[Sharing functionality](https://github.com/phated/undertaker#sharing-functionalities). (e.g. you could override the task prototype to add some additional logging, bind task metadata or include some config settings.)
745
+
-[Sharing functionality](https://github.com/phated/undertaker#sharing-functionalities) (e.g. you could override the task prototype to add some additional logging, bind task metadata or include some config settings.)
734
746
- Handling other behavior that hooks into the registry lifecycle (see [gulp-hub](https://github.com/frankwallis/gulp-hub) for an example)
735
747
736
748
To build your own custom registry see the [undertaker documentation on custom registries](https://github.com/phated/undertaker#custom-registries).
0 commit comments