Simple, efficient file watching for Node.
CoffeeScript JavaScript
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
Sakefile
package.json

README.md

vigil

npm build dependencies downloads license chat

Simple, fast, efficient file watcher for node.

Install

$ npm install vigil --save

API

vigil.run(fn, cb)

Executes fn (typically a server), watching modules required into VM for changes and executing cb on change events.

vigil.vm(cb)

Watches modules required into VM for changes, executing cb on change events

vigil.walk(path, cb)

Walks path, calling cb with (filename, stats) for each file found (optionally matching glob pattern).

vigil.watch(path, cb)

Watches path for changes, calling cb with (filename, stats, isModule) on change.

Example

vigil.watch('src/*.coffee', function(filename, stats) {
    exec('coffee -bcm ' + filename)
})

Check the tests for more examples.

License

MIT