only monitor file changes - before it would trigger a restart if a new file appeared in a directory

This commit is contained in:
remy
2010-10-05 08:22:58 +01:00
parent 0e6950c7e8
commit dbf89da15c

View File

@@ -17,7 +17,7 @@ var fs = require('fs'),
reComments = /#.*$/,
reTrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g,
reEscapeChars = /[.|\-[\]()\\]/g,
reAsterisk = /\*/g;
reAsterisk = /\*/g;
function startNode() {
sys.log('[nodemon] starting node');
@@ -43,7 +43,7 @@ function startNode() {
}
function startMonitor() {
var cmd = 'find . -newer ' + flag + ' -print;';
var cmd = 'find . -type f -newer ' + flag + ' -print';
exec(cmd, function (error, stdout, stderr) {
var files = stdout.split(/\n/);