diff --git a/README.md b/README.md index 856ba15b..cb8df3e8 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/doc/cli/help.txt b/doc/cli/help.txt index dcbe5307..eea0d78d 100644 --- a/doc/cli/help.txt +++ b/doc/cli/help.txt @@ -23,7 +23,7 @@ -- ........... 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 diff --git a/lib/config/exec.js b/lib/config/exec.js index b7ae68d1..d1128b65 100644 --- a/lib/config/exec.js +++ b/lib/config/exec.js @@ -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'