Skip to content

Commit

Permalink
Docs: Added allowEmpty option for gulp.src
Browse files Browse the repository at this point in the history
  • Loading branch information
callumacrae authored and phated committed Dec 31, 2017
1 parent 96febce commit 8806326
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,21 @@ Default: `false`
If true, it will create a duplex stream which passes items through and
emits globbed files.

### options.allowEmpty
Type: `Boolean`
Default: `false`

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.

```js
// Emits an error if app/scripts.js doesn't exist
gulp.src('app/scripts.js')
.pipe(...);

// Won't emit an error
gulp.src('app/scripts.js', { allowEmpty: true })
.pipe(...);
```

### gulp.dest(path[, options])

Expand Down

0 comments on commit 8806326

Please sign in to comment.