Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -22,7 +22,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