diff --git a/README.md b/README.md index 45a9ef5..2a2c99d 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,10 @@ Install globally with `npm`. ```sh npm install devtool -g ``` +If you are in China, you may install by this much more fast: +```sh +ELECTRON_MIRROR='https://npm.taobao.org/mirrors/electron/' npm install devtool -g --registry=https://registry.npm.taobao.org +``` ## Usage diff --git a/lib/file-watch.js b/lib/file-watch.js index 353aded..dde2469 100644 --- a/lib/file-watch.js +++ b/lib/file-watch.js @@ -11,9 +11,10 @@ var ignores = [ module.exports = function fileWatch (glob, opt) { opt = assign({ - ignored: ignores, + ignored: opt.config.ignored || ignores, ignoreInitial: true }, opt); + glob = opt.config.paths || glob; if (opt.poll) { opt.usePolling = true;