Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disableGlobbing option, added in Chokidar 1.7.0 #343

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions bin/args.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ module.exports = function (args) {
if (ignoreWatch) {
opts.ignoreWatch = ignoreWatch;
}
var disableGlobbing = defined(b.argv['disable-globbing']);
if (disableGlobbing) {
opts.disableGlobbing = true;
}

return watchify(b, xtend(opts, b.argv));
};
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ function watchify (b, opts) {
? opts.poll
: undefined;
}
if (opts.disableGlobbing) {
wopts.disableGlobbing = true;
}

if (cache) {
b.on('reset', collect);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"anymatch": "^1.3.0",
"browserify": "^14.0.0",
"chokidar": "^1.0.0",
"chokidar": "^1.7.0",
"defined": "^1.0.0",
"outpipe": "^1.1.0",
"through2": "^2.0.0",
Expand Down
8 changes: 8 additions & 0 deletions readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ Advanced Options:

Use polling to monitor for changes. Omitting the interval will default
to 100ms. This option is useful if you're watching an NFS volume.

--disable-globbing [default: false]

If set to `true` then entry files are treated as literal path names,
even if they look like globs.
```

# methods
Expand Down Expand Up @@ -167,6 +172,9 @@ b.plugin(bundle, {
});
```

`opts.disableGlobbing` treats entry files as literal path names, even if they look like globs.
See also Chokidar's [documentation](https://github.com/paulmillr/chokidar#path-filtering).

## b.close()

Close all the open watch handles.
Expand Down