Skip to content

Commit

Permalink
docs: add important note about ignore rules
Browse files Browse the repository at this point in the history
Fixes #2057
  • Loading branch information
remy committed Aug 16, 2022
1 parent 8fe7d77 commit fb51359
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ A config file can take any of the command line arguments as JSON key values, for
```json
{
"verbose": true,
"ignore": ["*.test.js", "fixtures/*"],
"ignore": ["*.test.js", "**/fixtures/**"],
"execMap": {
"rb": "ruby",
"pde": "processing --sketch={{pwd}} --run"
Expand All @@ -109,7 +109,7 @@ Specify the config in the same format as you would for a config file but under `
"homepage": "http://nodemon.io",
"...": "... other standard package.json values",
"nodemonConfig": {
"ignore": ["test/*", "docs/*"],
"ignore": ["**/test/**", "**/docs/**"],
"delay": 2500
}
}
Expand Down Expand Up @@ -203,6 +203,8 @@ Patterns can also be ignored (but be sure to quote the arguments):
nodemon --ignore 'lib/*.js'
```

**Important** the ignore rules are patterns matched to the full absolute path, and this determines how many files are monitored. If using a wild card glob pattern, it needs to be used as `**` or omitted entirely. For example, `nodemon --ignore '**/test/**'` will work, whereas `--ignore '*/test/*'` will not.

Note that by default, nodemon will ignore the `.git`, `node_modules`, `bower_components`, `.nyc_output`, `coverage` and `.sass-cache` directories and *add* your ignored patterns to the list. If you want to indeed watch a directory like `node_modules`, you need to [override the underlying default ignore rules](https://github.com/remy/nodemon/blob/master/faq.md#overriding-the-underlying-default-ignore-rules).

## Application isn't restarting
Expand Down

0 comments on commit fb51359

Please sign in to comment.