mirror of
https://github.com/SrIzan10/nodemon.git
synced 2026-05-01 10:55:09 +00:00
only monitor file changes - before it would trigger a restart if a new file appeared in a directory
This commit is contained in:
4
nodemon
4
nodemon
@@ -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/);
|
||||
|
||||
Reference in New Issue
Block a user