Skip to content

Commit 9102322

Browse files
Changed watchFile callback behavior.
We no longer recompile unless the new last-modified time is more recent.
1 parent f2a8842 commit 9102322

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/compiler/sys.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,11 @@ var sys: System = (function () {
199199
close() { _fs.unwatchFile(fileName, fileChanged); }
200200
};
201201

202-
function fileChanged() {
202+
function fileChanged(curr:any, prev:any) {
203+
if (+curr.mtime <= +prev.mtime) {
204+
return;
205+
}
206+
203207
callback(fileName);
204208
};
205209
},

0 commit comments

Comments
 (0)