Skip to content

Commit

Permalink
add RegExp to the include and exclude fields of the WatcherOptions ty…
Browse files Browse the repository at this point in the history
…pe (#3754)

* add RegExp to the include and exclude fields of the WatcherOptions type

* Update src/rollup/types.d.ts

Co-authored-by: Lukas Taegert-Atkinson <lukastaegert@users.noreply.github.com>

* update WatcherOptions type include/exclude in99-big-list-of-options.md

Co-authored-by: Paul Cowan <paul.cowan@disclosurescotland.gov.scot>
Co-authored-by: Lukas Taegert-Atkinson <lukastaegert@users.noreply.github.com>
  • Loading branch information
3 people committed Sep 1, 2020
1 parent 379f2d6 commit 35bdac7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
@@ -1,6 +1,5 @@
# rollup changelog

## 2.26.9
*unreleased*

### Pull Requests
Expand Down
4 changes: 2 additions & 2 deletions docs/999-big-list-of-options.md
Expand Up @@ -1509,7 +1509,7 @@ Default: `true`
Whether to clear the screen when a rebuild is triggered.

#### watch.exclude
Type: `string`<br>
Type: `string | RegExp | (string | RegExp)[]`<br>
CLI: `--watch.exclude <files>`

Prevent files from being watched:
Expand All @@ -1525,7 +1525,7 @@ export default {
```

#### watch.include
Type: `string`<br>
Type: `string | RegExp | (string | RegExp)[]`<br>
CLI: `--watch.include <files>`

Limit the file-watching to certain files. Note that this only filters the module graph but does not allow to add additional watch files:
Expand Down
4 changes: 2 additions & 2 deletions src/rollup/types.d.ts
Expand Up @@ -754,8 +754,8 @@ export interface WatcherOptions {
buildDelay?: number;
chokidar?: ChokidarOptions;
clearScreen?: boolean;
exclude?: string[];
include?: string[];
exclude?: string | RegExp | (string | RegExp)[];
include?: string | RegExp | (string | RegExp)[];
skipWrite?: boolean;
}

Expand Down

0 comments on commit 35bdac7

Please sign in to comment.