Skip to content

Commit

Permalink
fix: Support for .mjs es6 modules (#1138)
Browse files Browse the repository at this point in the history
  • Loading branch information
JayBeavers authored and remy committed Dec 4, 2017
1 parent 9b6c786 commit 5a89df6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Don't use unix globbing to pass multiple directories, e.g `--watch ./lib/*`, it

## Specifying extension watch list

By default, nodemon looks for files with the `.js`, `.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:
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:

nodemon -e js,jade

Expand Down
2 changes: 1 addition & 1 deletion doc/cli/help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
-- <your args> ........... to tell nodemon stop slurping arguments.

Note: if the script is omitted, nodemon will try to read "main" from
package.json and without a nodemon.json, nodemon will monitor .js, .coffee,
package.json and without a nodemon.json, nodemon will monitor .js, .mjs, .coffee,
and .litcoffee by default.

To learn more about nodemon.json config: nodemon --help config
Expand Down
2 changes: 1 addition & 1 deletion lib/config/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function exec(nodemonOptions, execMap) {
if (options.exec === 'coffee') {
// don't override user specified extension tracking
if (!options.ext) {
extension = 'coffee,litcoffee,js,json';
extension = 'coffee,litcoffee,js,json,mjs';
}

// because windows can't find 'coffee', it needs the real file 'coffee.cmd'
Expand Down

0 comments on commit 5a89df6

Please sign in to comment.