Skip to content

Commit

Permalink
Merge pull request #2168 from MNBuyskih/dev
Browse files Browse the repository at this point in the history
Fix not watching files in windows
  • Loading branch information
Panya committed Jul 20, 2017
2 parents ed96bbf + f06f6d5 commit dfce7a6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bin/stylus
Expand Up @@ -757,9 +757,7 @@ function watch(file, rootFile) {
// if is windows use fs.watch api instead
// TODO: remove watchFile when fs.watch() works on osx etc
if (isWindows) {
fs.watch(file, function(event) {
if (event === 'change') compile();
});
fs.watch(file, compile);
} else {
fs.watchFile(file, { interval: 300 }, function(curr, prev) {
if (curr.mtime > prev.mtime) compile();
Expand Down

0 comments on commit dfce7a6

Please sign in to comment.