Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

watchr

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watchr - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0

History.md

7

package.json
{
"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 &copy; 2011-2012 [Benjamin Arthur Lupton](http://balupton.com)
bin/watchr.js

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc