diff options
Diffstat (limited to 'node_modules/chokidar/README.md')
-rw-r--r-- | node_modules/chokidar/README.md | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/node_modules/chokidar/README.md b/node_modules/chokidar/README.md index bcd005b0f..0d67f8302 100644 --- a/node_modules/chokidar/README.md +++ b/node_modules/chokidar/README.md @@ -61,7 +61,7 @@ Then `require` and use it in your code: var chokidar = require('chokidar'); // One-liner for current directory, ignores .dotfiles -chokidar.watch('.', {ignored: /[\/\\]\./}).on('all', (event, path) => { +chokidar.watch('.', {ignored: /(^|[\/\\])\../}).on('all', (event, path) => { console.log(event, path); }); ``` @@ -71,7 +71,7 @@ chokidar.watch('.', {ignored: /[\/\\]\./}).on('all', (event, path) => { // Initialize watcher. var watcher = chokidar.watch('file, dir, glob, or array', { - ignored: /[\/\\]\./, + ignored: /(^|[\/\\])\../, persistent: true }); @@ -120,6 +120,7 @@ chokidar.watch('file', { ignoreInitial: false, followSymlinks: true, cwd: '.', + disableGlobbing: false, usePolling: true, interval: 100, @@ -168,6 +169,8 @@ symlinks themselves will be watched for changes instead of following the link references and bubbling events through the link's path. * `cwd` (no default). The base directory from which watch `paths` are to be derived. Paths emitted with events will be relative to this. +* `disableGlobbing` (default: `false`). If set to `true` then the strings passed to `.watch()` and `.add()` are treated as +literal path names, even if they look like globs. #### Performance @@ -180,7 +183,8 @@ non-standard situations. Setting to `true` explicitly on OS X overrides the `useFsEvents` default. You may also set the CHOKIDAR_USEPOLLING env variable to true (1) or false (0) in order to override this option. * _Polling-specific settings_ (effective when `usePolling: true`) - * `interval` (default: `100`). Interval of file system polling. + * `interval` (default: `100`). Interval of file system polling. You may also + set the CHOKIDAR_INTERVAL env variable to override this option. * `binaryInterval` (default: `300`). Interval of file system polling for binary files. ([see list of binary extensions](https://github.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json)) @@ -196,7 +200,7 @@ already available from the underlying watch events. * `depth` (default: `undefined`). If set, limits how many levels of subdirectories will be traversed. * `awaitWriteFinish` (default: `false`). -By default, the `add` event will fire when a file first appear on disk, before +By default, the `add` event will fire when a file first appears on disk, before the entire file has been written. Furthermore, in some cases some `change` events will be emitted while the file is being written. In some cases, especially when watching for large files there will be a need to wait for the |