este-watch

Fast and reliable files watcher.

npm install este-watch
5 downloads in the last day
68 downloads in the last week
81 downloads in the last month

este-watch Build Status Dependency Status

Fast and reliable Node.js files watcher.

  • It's fast, because it wraps fs.watch which does not use pooling.
  • It's reliable, because it supports only that behavior that works reliable across all OS's.

Why yet another file watcher?

There are zilions Node.js file watchers. No one is perfect. The most feature rich is probably gaze, but it burns CPU because it uses pooling fs.watchFile. This watcher uses only fs.watch so it has limited functionality, but it works. And it's fast even for thousands of files. Read more here and here.

Example

var esteWatch = require('este-watch');

esteWatch(['foo', 'bar'], function(e) {
  switch (e.extension) {
    case 'js':
      console.log(e.filepath);
      break
    case 'css':
      console.log(e.filepath);
      break;
  }
}).start();
npm loves you