Skip to content

Commit

Permalink
docs: add context to fences
Browse files Browse the repository at this point in the history
  • Loading branch information
remy committed Jan 11, 2018
1 parent 9d49852 commit 60d1add
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions README.md
Expand Up @@ -15,15 +15,15 @@ nodemon does **not** require *any* changes to your code or method of development

Either through cloning with git or by using [npm](http://npmjs.org) (the recommended way):

```
```bash
npm install -g nodemon
```

And nodemon will be installed globally to your system path.

You can also install nodemon as a developement dependency:

```
```bash
npm install --save-dev nodemon
```

Expand All @@ -33,19 +33,19 @@ With a local installation, nodemon will not be available in your system path. In

nodemon wraps your application, so you can pass all the arguments you would normally pass to your app:

```
```bash
nodemon [your node app]
```

For CLI options, use the `-h` (or `--help`) argument:

```
```bash
nodemon -h
```

Using nodemon is simple, if my application accepted a host and port as the arguments, I would start it as so:

```
```bash
nodemon ./server.js localhost 8080
```

Expand All @@ -55,7 +55,7 @@ If no script is given, nodemon will test for a `package.json` file and if found,

You can also pass the `inspect` flag to node through the command line as you would normally:

```
```bash
nodemon --inspect ./server.js 80
```

Expand Down Expand Up @@ -129,7 +129,7 @@ Please see [doc/requireable.md](doc/requireable.md)

nodemon can also be used to execute and monitor other programs. nodemon will read the file extension of the script being run and monitor that extension instead of .js if there's no `nodemon.json`:

```
```bash
nodemon --exec "python -v" ./app.py
```

Expand All @@ -151,7 +151,7 @@ To add support for nodemon to know about the .pl extension (for Perl), the nodem

Now running the following, nodemon will know to use `perl` as the executable:

```
```bash
nodemon script.pl
```

Expand All @@ -161,7 +161,7 @@ It's generally recommended to use the global `nodemon.json` to add your own `exe

By default nodemon monitors the current working directory. If you want to take control of that option, use the `--watch` option to add specific paths:

```
```bash
nodemon --watch app --watch libs app/server.js
```

Expand All @@ -173,7 +173,7 @@ Don't use unix globbing to pass multiple directories, e.g `--watch ./lib/*`, it

By default, nodemon looks for files with the `.js`, `.mjs`, `.coffee`, `.litcoffee`, and `.json` extensions. If you use the `--exec` option and monitor `app.py` nodemon will monitor files with the extension of `.py`. However, you can specify your own list with the `-e` (or `--ext`) switch like so:

```
```bash
nodemon -e js,jade
```

Expand All @@ -185,19 +185,19 @@ By default, nodemon will only restart when a `.js` JavaScript file changes. In s

This can be done via the command line:

```
```bash
nodemon --ignore lib/ --ignore tests/
```

Or specific files can be ignored:

```
```bash
nodemon --ignore lib/app.js
```

Patterns can also be ignored (but be sure to quote the arguments):

```
```bash
nodemon --ignore 'lib/*.js'
```

Expand All @@ -209,7 +209,7 @@ In some networked environments (such as a container running nodemon reading acro

Via the CLI, use either `--legacy-watch` or `-L` for short:

```
```bash
nodemon -L
```

Expand All @@ -221,27 +221,27 @@ In some situations, you may want to wait until a number of files have changed. T

To add an extra throttle, or delay restarting, use the `--delay` command:

```
```bash
nodemon --delay 10 server.js
```

For more precision, milliseconds can be specified. Either as a float:

```
```bash
nodemon --delay 2.5 server.js
```

Or using the time specifier (ms):

```
```bash
nodemon --delay 2500ms server.js
```

The delay figure is number of seconds (or milliseconds, if specified) to delay before restarting. So nodemon will only restart your app the given number of seconds after the *last* file change.

If you are setting this value in `nodemon.json`, the value will always be interpretted in milliseconds. E.g., the following are equivalent:

```
```bash
nodemon --delay 2.5

{
Expand Down

0 comments on commit 60d1add

Please sign in to comment.