Skip to content

Commit

Permalink
fix: watch js, json files by default
Browse files Browse the repository at this point in the history
In node the file extension is optional, so by default nodemon should watch
js and json files.

Closes #710
  • Loading branch information
madbence committed Oct 29, 2015
1 parent f5d1a04 commit 3480f37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/config/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function exec(nodemonOptions, execMap) {
var options = utils.clone(nodemonOptions || {});
var script = path.basename(options.script || '');
var scriptExt = path.extname(script).slice(1);
var extension = options.ext || scriptExt + ',json' || 'js,json';
var extension = options.ext || (scriptExt ? scriptExt + ',json' : 'js,json');
var execDefined = !!options.exec;

// allows the user to simplify cli usage:
Expand Down

0 comments on commit 3480f37

Please sign in to comment.