Comparing version 0.1.0 to 1.0.0
{ | ||
"name": "watchr", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"description": "Node.js watching library, as all the other ones suck.", | ||
@@ -45,2 +45,7 @@ "homepage": "https://github.com/balupton/watchr", | ||
}, | ||
"devDependencies": { | ||
"docco": "0.3.x", | ||
"bal-util": "1.1.x", | ||
"mocha": "0.11.x" | ||
}, | ||
"engines" : { | ||
@@ -47,0 +52,0 @@ "node": ">=0.4.0" |
## Watchr. Node.js file watching that doesn't suck. | ||
Watchr is simple, you call `require('watchr').watch(path,function(){console.log('something changed inside the directory')})` | ||
Watchr normalises the node.js watching functionality between 0.4's `fs.watchFile`, and 0.6's `fs.watch`, and adds support for watching entire directories including their far descendants (some call this recursive directory watching) | ||
To install `npm install watchr` | ||
It works with node.js 0.4, 0.5 and 0.6. It will use `fs.watchFile` if available, otherwise it will use `fs.watch` (e.g. windows support). | ||
### Using | ||
The `fs.watch` functionality is currently quite buggy - node.js returns segmentation faults here and there, but that is due to bugs in node.js. Sigh. Anyway, Enjoy. | ||
- JavaScript | ||
``` javascript | ||
// Requires | ||
require('coffee-script'); # watchr dependency | ||
var watchr = require('watchr'); | ||
// Watch | ||
watchr.watch(path,function(){ | ||
console.log('something changed inside the directory'); | ||
}); | ||
``` | ||
- CoffeeScript | ||
``` javascript | ||
# Requires | ||
watchr = require('watchr') | ||
# Watch | ||
watchr.watch path, -> | ||
console.log('something changed inside the directory') | ||
``` | ||
## Install | ||
``` bash | ||
npm install coffee-script watchr | ||
``` | ||
## Support | ||
Support can be found in the [github issue tracker](https://github.com/balupton/watchr/issues) | ||
## History | ||
You can discover the history inside the [History.md](https://github.com/balupton/watchr/blob/master/History.md#files) file | ||
## License | ||
Licensed under the [MIT License](http://creativecommons.org/licenses/MIT/) | ||
Copyright 2011 [Benjamin Arthur Lupton](http://balupton.com) | ||
<br/>Copyright © 2011-2012 [Benjamin Arthur Lupton](http://balupton.com) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
64891
13
1
54
0
3
183