Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed windows compatibility #32

Merged
merged 1 commit into from

4 participants

@dawnerd

Changed fs.watchFile to use newer fs.watch api.

@tig

Hi dawnerd: Are you sure this the only change needed? I get a "watch Unknown system errono 123" when I apply this 2 line fix.

@dawnerd

That fix worked for me. Not sure why you're getting that error.

@tig

@dawnerd Is the project where you are using -assetmanager public? If so, would you mind pointing me at it so I can have another example of how to use it correctly. I'm having trouble knowing if I'm even doing it right. thanks.

@tig

@dawnerd - I figured it out. Your fix does, in fact, work fine. +1 on the pull request.

@prabirshrestha

+1
would to have that pull in with a new npm package too.

@mape mape merged commit 7ec1ba6 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/assetmanager.js
View
4 lib/assetmanager.js
@@ -111,8 +111,8 @@ module.exports = function assetManager (assets) {
if (file.match(/^https?:\/\//)) {
return;
}
- fs.watchFile(group.path + file, function (old, newFile) {
- if (old.mtime.toString() != newFile.mtime.toString()) {
+ fs.watch(group.path + file, function (event, file) {
+ if (event === 'change') {
self.generateCache(groupName);
}
});
Something went wrong with that request. Please try again.