nodemon Agent Skills & AI Rules

GitHub

Monitor for any changes in your node.js application and automatically restart the server - perfect for development

26,682 stars JavaScript JavaScript 1 file ยท ~7,907 tokens #node#nodemon#watch
RAW Rules
1 Discovered Rules โ€ข ~209 Estimated Tokens
Loading skill content...

doc - Development & Architecture Rules

doc/rules.md root-instruction ~209 tokens
Raw
# Rules

Given a nodemon.json file that contains:

```json
{
  "ignore": ["*.coffee"],
  "watch": ["server/*.coffee", "test/"]
}
```

Then nodemon detects changes, but what causes nodemon to restart? The ignored files or the watched files? Which wins?

```js
const files = ['server/foo.coffee', 'server/app.js'];

// afterIgnore = ['server/app.js'] now since foo.coffee matches *.coffee
const afterIgnore = files.filter(applyIgnore);

// watch = ['server/foo.coffee'] as it's under the watch
const watched = files.filter(applyWatch);
```

What about:

```js
const files = ['test/app.js', 'test/app.coffee'];

// afterIgnore = ['test/app.js'] now since test/app.coffee matches *.coffee
const afterIgnore = files.filter(applyIgnore);

// watch.length = 2 as watch implies test/*.*
const watched = files.filter(applyWatch);
```