Skip to content

Commit

Permalink
refactor: get default ignoreRoot from ignore-by-default
Browse files Browse the repository at this point in the history
Switches the default ignoreRoot to a list obtained from the ignore-by-default
package. See <https://github.com/novemberborn/ignore-by-default>.

This allows nodemon to tap into a shared list of directories it should ignore
when watching for changes. E.g. compared to the original list it's already been
extended with `.nyc_output` and `coverage` directories.
  • Loading branch information
novemberborn authored and remy committed Feb 25, 2016
1 parent 095fa7b commit 6ccb298
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/config/defaults.js
@@ -1,3 +1,5 @@
var ignoreRoot = require('ignore-by-default').directories()

// default options for config.options
module.exports = {
restartable: 'rs',
Expand All @@ -9,7 +11,7 @@ module.exports = {
// compatible with linux, mac and windows, or make the default.js
// dynamically append the `.cmd` for node based utilities
},
ignoreRoot: ['.git', 'node_modules', 'bower_components', '.sass-cache'],
ignoreRoot: ignoreRoot,
watch: ['*.*'],
stdin: true,
runOnChangeOnly: false,
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -49,6 +49,7 @@
"chokidar": "^1.2.0",
"debug": "^2.2.0",
"es6-promise": "^3.0.2",
"ignore-by-default": "^1.0.0",
"lodash.defaults": "^3.1.2",
"minimatch": "^3.0.0",
"ps-tree": "^1.0.1",
Expand Down

0 comments on commit 6ccb298

Please sign in to comment.