Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #746 from jiyinyiyong/master

fix --watch
  • Loading branch information...
commit c8c64e6ca5b956a79b747f55ca6939ced65c0320 2 parents 000f6ed + 149086b
TJ Holowaychuk tj authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 bin/jade
6 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);
});
});
}
Please sign in to comment.
Something went wrong with that request. Please try again.