Permalink
Browse files

fix -w

  • Loading branch information...
1 parent 000f6ed commit 149086bbb9c40d35ca28fa47e230cb527c1c76c8 @jiyinyiyong jiyinyiyong committed Aug 21, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 bin/jade
View
@@ -95,10 +95,8 @@ if (files.length) {
files.forEach(renderFile);
if (options.watch) {
files.forEach(function (file) {
- fs.watchFile(file, {persistent: true, interval: 500}, function (prev, curr) {
- if (prev.size !== curr.size && prev.mtime.getTime() !== curr.mtime.getTime()) {
- renderFile(file);
- }
+ fs.watchFile(file, {interval: 100}, function (curr, prev) {
+ if (curr.mtime > prev.mtime) renderFile(file);
});
});
}

0 comments on commit 149086b

Please sign in to comment.