npm.io
1.0.4 • Published 8 years ago

mako-watch

Licence
MIT
Version
1.0.4
Deps
4
Vulns
0
Weekly
0

mako-watch

A mako util for watching a build root for changes.

npm version npm dependencies npm dev dependencies

Purpose

This plugin takes a mako tree, and sets up a watch (using chokidar) against the configured root. The watcher itself is an Emitter with events for responding to changes in the dependency tree.

API

Watcher(tree, options)

Creates a new watcher for the given mako tree. The input options will be passed directly to chokidar.

Events
  • ready() after the initial scan is complete
  • change(file, tree) when a file has been modified
  • error(err) when an error has been triggered
Watcher#unwatch()

Shuts down the chokidar watcher.