Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix -w

  • Loading branch information...
commit 149086bbb9c40d35ca28fa47e230cb527c1c76c8 1 parent 000f6ed
@jiyinyiyong jiyinyiyong authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 bin/jade
View
6 bin/jade
@@ -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);
});
});
}
Please sign in to comment.
Something went wrong with that request. Please try again.