Comparing version 2.3.1 to 2.3.2
## History | ||
- v2.3.2 January 6, 2013 | ||
- Fixed closing when a child path watcher doesn't exist | ||
- Closes [pull request #26](https://github.com/bevry/watchr/pull/26) thanks to [Jason Als](https://github.com/jasonals) | ||
- Added close tests | ||
- v2.3.1 December 19, 2012 | ||
@@ -4,0 +9,0 @@ - Fixed a bug with closing directories that have children |
@@ -276,4 +276,4 @@ // Generated by CoffeeScript 1.4.0 | ||
} else { | ||
childFileFullPath = childFileWatcher.path; | ||
_this.log('debug', 'determined delete:', childFileRelativePath); | ||
childFileFullPath = pathUtil.join(fileFullPath, childFileRelativePath); | ||
_this.log('debug', 'determined delete:', childFileFullPath); | ||
return _this.closeChild(childFileRelativePath, 'deleted'); | ||
@@ -322,3 +322,3 @@ } | ||
} | ||
this.log('debug', "close: " + this.path, (new Error()).stack); | ||
this.log('debug', "close: " + this.path); | ||
_ref = this.children; | ||
@@ -325,0 +325,0 @@ for (childRelativePath in _ref) { |
{ | ||
"name": "watchr", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"description": "Better file system watching for Node.js", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/bevry/watchr", |
@@ -36,2 +36,3 @@ ## Watchr: better file system watching for Node.js | ||
To wrap it all together, it would look like this: | ||
@@ -41,5 +42,6 @@ | ||
// Require | ||
watchr = require('watchr') | ||
var watchr = require('watchr') | ||
// Watch a directory or file | ||
console.log('Watch our paths'); | ||
watchr.watch({ | ||
@@ -62,3 +64,13 @@ paths: ['path1','path2','path3'], | ||
next: function(err,watchers){ | ||
console.log('watching for all our paths has completed', arguments); | ||
// Watching all setup | ||
console.log('Now watching our paths', arguments); | ||
// Close watchers after 10 seconds | ||
setTimeout(function(){ | ||
var i; | ||
console.log('Stop watching our paths'); | ||
for ( i=0; i<watchers.length; i++ ) { | ||
watchers[i].close(); | ||
} | ||
},10*1000); | ||
} | ||
@@ -65,0 +77,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
33420
9
609
95