You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+56-32Lines changed: 56 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ your `"scripts"`:
23
23
}
24
24
```
25
25
26
-
Possibilty to watch for different tasks
26
+
There is the possibility to watch for different tasks
27
27
28
28
```javascript
29
29
{
@@ -59,7 +59,7 @@ Also it is now possible to obtain a second parameter to define the script which
59
59
60
60
If you need to watch files with extensions other than those that `nodemon` watches [by default](https://github.com/remy/nodemon#specifying-extension-watch-list) (`.js`, `.coffee`, `.litcoffee`), you can set the value to an object with `patterns` and `extensions` keys. You can also add an `ignore` key (a list or a string) to ignore specific files. Finally, you can add a `quiet` flag to hide the script name in any output on stdout or stderr, or you can use the `inherit` flag to preserve the original's process stdout or stderr. You can enable `nodemon`[legacy watch](https://github.com/remy/nodemon#application-isnt-restarting) and specify the restart [delay](https://github.com/remy/nodemon#delaying-restarting) in milliseconds with the corresponding flags.
61
61
62
-
> The `quiet` flag was changed from a `string` to a `boolean` in `0.1.5`. Backwards compatability will be kept for two patch versions.
62
+
> The `quiet` flag was changed from a `string` to a `boolean` in `0.1.5`. Backwards compatibility will be kept for two patch versions.
63
63
64
64
Use `runOnChangeOnly` to set the nodemon option [--on-change-only](https://github.com/remy/nodemon/blob/master/doc/cli/options.txt"--on-change-only"). Setting this to `true` tells nodemon to execute script on change only, not startup.
65
65
@@ -127,72 +127,96 @@ Tests run *perfectly*, ship it to the enterprise!
127
127
#### `patterns`
128
128
129
129
Array of paths to watch
130
+
```javascript
131
+
"patterns": ["src", "test"]
132
+
```
130
133
131
134
#### `extensions`
132
135
133
-
Array of file extensions to watch
136
+
Comma delimited list of file extensions to watch
137
+
```javascript
138
+
"extensions":"js,jsx"
139
+
```
134
140
135
141
#### `ignore`
136
142
137
-
String or array of paths to ignore
143
+
Add an `ignore` property to your `watch` object. The value of `ignore` can be a string if you only want to ignore
144
+
a single glob:
145
+
146
+
```
147
+
"watch": {
148
+
"build": {
149
+
"ignore": "build",
150
+
...
151
+
}
152
+
...
153
+
}
154
+
```
155
+
156
+
Or an array if you want to ignore multiple globs:
157
+
158
+
```
159
+
"watch": {
160
+
"build": {
161
+
"ignore": [
162
+
"build",
163
+
"node_modules"
164
+
],
165
+
...
166
+
}
167
+
...
168
+
}
169
+
```
138
170
139
171
#### `quiet`
140
172
141
173
Boolean to hide the script name in any output on stdout and stderr
174
+
```javascript
175
+
"quiet":false
176
+
```
142
177
143
178
#### `inherit`
144
179
145
180
Boolean to preserve the original process' stdout and stderr
181
+
```javascript
182
+
"inherit":false
183
+
```
146
184
147
185
#### `legacyWatch`
148
186
149
187
Boolean to enable [legacy watch](https://github.com/remy/nodemon#application-isnt-restarting)
188
+
```javascript
189
+
"legacyWatch":true
190
+
```
150
191
151
192
#### `delay`
152
193
153
194
Number of milliseconds to [delay](https://github.com/remy/nodemon#delaying-restarting) before checking for new files
195
+
```javascript
196
+
"delay":2500
197
+
```
154
198
155
199
#### `clearBuffer`
156
200
157
201
Boolean to clear the buffer after detecting a new change
202
+
```javascript
203
+
"clearBuffer":true
204
+
```
158
205
159
206
#### `verbose`
160
207
161
208
Boolean to turn on the nodemons verbose mode
209
+
```javascript
210
+
"verbose":true
211
+
```
162
212
163
213
#### `silent`
164
214
165
215
Boolean to turn on nodemons silent (quiet) mode
166
216
Silent was used as we already had an existing flag called quiet. This may change in a future release
167
217
168
-
#### `Ignore files`
169
-
170
-
Add an `ignore` property to your `watch` object. The value of `ignore` can be a string if you only want to ignore
0 commit comments