diff --git a/lib/command.js b/lib/command.js index 2d1241a8..36d89d57 100644 --- a/lib/command.js +++ b/lib/command.js @@ -159,7 +159,7 @@ persistent: true, interval: 500 }, function(curr, prev) { - if (curr.mtime.getTime() === prev.mtime.getTime()) { + if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) { return null; } return fs.readFile(source, function(err, code) { diff --git a/src/command.coffee b/src/command.coffee index c136e7a7..223218b8 100644 --- a/src/command.coffee +++ b/src/command.coffee @@ -133,7 +133,7 @@ compileStdio = -> # such as `--lint` or `--print`. watch = (source, base) -> fs.watchFile source, {persistent: true, interval: 500}, (curr, prev) -> - return if curr.mtime.getTime() is prev.mtime.getTime() + return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime() fs.readFile source, (err, code) -> throw err if err compileScript(source, code.toString(), base)