eye-spy

3.0.0 • Public • Published

Eye Spy

A simple tool utilizing regex and file system changes. Any time a file changes and the path passes an added regex test, the corresponding function will be executed. Once you are done you must call the done function so that you can continue getting updates.

The use case for this tool was to compile my project when ever I saved files or restart my http server. I don't like build buttons.

Example

var spy = require("eye-spy");

// Watch all js files and log it out.
spy(".", /^.*\.js$/, function (path, done) {
  console.log("changed:", path);
  done();
});

Package Sidebar

Install

npm i eye-spy

Weekly Downloads

1

Version

3.0.0

License

ISC

Last publish

Collaborators

  • tmathews