Changed watchFile callback behavior.

We no longer recompile unless the new last-modified time is more recent.
This commit is contained in:
Daniel Rosenwasser 2014-07-31 21:58:05 -07:00 committed by Daniel Rosenwasser
parent f2a8842215
commit 91023227e4

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);
};
},