JSPM

watchr

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 22185
  • Score
    100M100P100Q139959F

Node.js watching library, as all the other ones suck.

Package Exports

  • watchr

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (watchr) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Watchr. Node.js file watching that doesn't suck.

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)

Using

  • JavaScript

    // Requires
    require('coffee-script'); # watchr dependency
    var watchr = require('watchr');
    
    // Watch
    watchr.watch(path,function(){
        console.log('something changed inside the directory');
    });
  • CoffeeScript

    # Requires
    watchr = require('watchr')
    
    # Watch
    watchr.watch path, ->
        console.log('something changed inside the directory')

Install

npm install coffee-script watchr

Support

Support can be found in the github issue tracker

History

You can discover the history inside the History.md file

License

Licensed under the MIT License
Copyright © 2011-2012 Benjamin Arthur Lupton