Changed watchFile callback behavior.

We no longer recompile unless the new last-modified time is more recent.
This commit is contained in:
Daniel Rosenwasser authored and Daniel Rosenwasser committed 2014-07-31 22:41:01 -07:00
1 parent f2a8842215
commit 91023227e4
1 file changed
+5 -1
+5 -1
View File
@@ -199,7 +199,11 @@ var sys: System = (function () {
close() { _fs.unwatchFile(fileName, fileChanged); }
};
function fileChanged() {
function fileChanged(curr:any, prev:any) {
if (+curr.mtime <= +prev.mtime) {
return;
}
callback(fileName);
};
},