Comparing version 0.3.1 to 0.3.2
@@ -6,3 +6,3 @@ { | ||
"description": "tail a file in node", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"repository": { | ||
@@ -9,0 +9,0 @@ "type": "git", |
@@ -56,1 +56,4 @@ #tail | ||
The Cakefile generates the javascript that is then published to npm. | ||
#License | ||
MIT. Please see License file for more details. |
15
tail.js
@@ -88,11 +88,5 @@ // Generated by CoffeeScript 1.6.2 | ||
this.isWatching = true; | ||
if (fs.watch) { | ||
return this.watcher = fs.watch(this.filename, this.fsWatchOptions, function(e) { | ||
return _this.watchEvent(e); | ||
}); | ||
} else { | ||
return fs.watchFile(this.filename, this.fsWatchOptions, function(curr, prev) { | ||
return _this.watchFileEvent(curr, prev); | ||
}); | ||
} | ||
return fs.watchFile(this.filename, this.fsWatchOptions, function(curr, prev) { | ||
return _this.watchFileEvent(curr, prev); | ||
}); | ||
}; | ||
@@ -113,2 +107,3 @@ | ||
}); | ||
_this.pos += stats.size; | ||
if (_this.queue.length === 1) { | ||
@@ -140,3 +135,3 @@ return _this.internalDispatcher.emit("next"); | ||
Tail.prototype.unwatch = function() { | ||
if (fs.watch) { | ||
if (fs.watch && this.watcher) { | ||
this.watcher.close(); | ||
@@ -143,0 +138,0 @@ this.pos = 0; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58
5344
129