Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ node_js:
- "6"
- "8"
- "10"
- "12"
env:
global:
- BUILD_TIMEOUT=10000
install: npm install --ignore-scripts
install: npm ci --ignore-scripts
before_install:
- if [[ $TRAVIS_NODE_VERSION -lt 8 ]]; then npm install --global npm@5; fi
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ export default function myPlugin ( options = {} ) {
}
```

If you want to resolve the patterns against a directory other than
`process.cwd()`, you can additionally pass a `resolve` option:

```js
var filter = createFilter( options.include, options.exclude, {resolve: '/my/base/dir'} )
```

If `resolve` is a string, then this value will be used as the base directory.
Relative paths will be resolved against `process.cwd()` first. If `resolve` is
`false`, then the patterns will not be resolved against any directory. This can
be useful if you want to create a filter for virtual module names.


### makeLegalIdentifier

Expand Down
Loading