Skip to content

Commit 700be2d

Browse files
committed
Fluff out the documentation a bit
1 parent e992bcf commit 700be2d

File tree

1 file changed

+56
-32
lines changed

1 file changed

+56
-32
lines changed

README.md

Lines changed: 56 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ your `"scripts"`:
2323
}
2424
```
2525

26-
Possibilty to watch for different tasks
26+
There is the possibility to watch for different tasks
2727

2828
```javascript
2929
{
@@ -59,7 +59,7 @@ Also it is now possible to obtain a second parameter to define the script which
5959

6060
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.
6161

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.
6363
6464
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.
6565

@@ -127,72 +127,96 @@ Tests run *perfectly*, ship it to the enterprise!
127127
#### `patterns`
128128

129129
Array of paths to watch
130+
```javascript
131+
"patterns": ["src", "test"]
132+
```
130133

131134
#### `extensions`
132135

133-
Array of file extensions to watch
136+
Comma delimited list of file extensions to watch
137+
```javascript
138+
"extensions": "js,jsx"
139+
```
134140

135141
#### `ignore`
136142

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+
```
138170

139171
#### `quiet`
140172

141173
Boolean to hide the script name in any output on stdout and stderr
174+
```javascript
175+
"quiet": false
176+
```
142177

143178
#### `inherit`
144179

145180
Boolean to preserve the original process' stdout and stderr
181+
```javascript
182+
"inherit": false
183+
```
146184

147185
#### `legacyWatch`
148186

149187
Boolean to enable [legacy watch](https://github.com/remy/nodemon#application-isnt-restarting)
188+
```javascript
189+
"legacyWatch": true
190+
```
150191

151192
#### `delay`
152193

153194
Number of milliseconds to [delay](https://github.com/remy/nodemon#delaying-restarting) before checking for new files
195+
```javascript
196+
"delay": 2500
197+
```
154198

155199
#### `clearBuffer`
156200

157201
Boolean to clear the buffer after detecting a new change
202+
```javascript
203+
"clearBuffer": true
204+
```
158205

159206
#### `verbose`
160207

161208
Boolean to turn on the nodemons verbose mode
209+
```javascript
210+
"verbose": true
211+
```
162212

163213
#### `silent`
164214

165215
Boolean to turn on nodemons silent (quiet) mode
166216
Silent was used as we already had an existing flag called quiet. This may change in a future release
167217

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
171-
a single glob:
172-
173-
```
174-
"watch": {
175-
"build": {
176-
"ignore": "build",
177-
...
178-
}
179-
...
180-
}
181-
```
182-
183-
Or an array if you want to ignore multiple globs:
184-
185-
```
186-
"watch": {
187-
"build": {
188-
"ignore": [
189-
"build",
190-
"node_modules"
191-
],
192-
...
193-
}
194-
...
195-
}
218+
```javascript
219+
"silent": true
196220
```
197221

198222
## Acknowledgements

0 commit comments

Comments
 (0)