From e5a472c0c49784fe0adac96e90e36ea5ce6c75e8 Mon Sep 17 00:00:00 2001 From: Lorenzo Stanco Date: Thu, 11 May 2017 10:48:52 +0200 Subject: [PATCH] Added disableGlobbing option, added in Chokidar 1.7.0 --- bin/args.js | 4 ++++ index.js | 3 +++ package.json | 2 +- readme.markdown | 8 ++++++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/bin/args.js b/bin/args.js index ccfdd3f..e69a749 100644 --- a/bin/args.js +++ b/bin/args.js @@ -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)); }; diff --git a/index.js b/index.js index 0753b9f..c784be8 100644 --- a/index.js +++ b/index.js @@ -30,6 +30,9 @@ function watchify (b, opts) { ? opts.poll : undefined; } + if (opts.disableGlobbing) { + wopts.disableGlobbing = true; + } if (cache) { b.on('reset', collect); diff --git a/package.json b/package.json index 22c85ae..61f9eb2 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/readme.markdown b/readme.markdown index 0ddc29f..2a1d699 100644 --- a/readme.markdown +++ b/readme.markdown @@ -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 @@ -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.