{"name":"monocle","version":"0.1.41","description":"a tool for watching directories for file changes","main":"monocle.js","directories":{"test":"test"},"dependencies":{"readdirp":"~0.2.3"},"devDependencies":{"mocha":"1.8.1"},"scripts":{"test":"mocha test -R spec -t 2000"},"repository":"","keywords":["watch","filesystem","folders","fs"],"author":{"name":"Sam Saccone"},"license":"BSD","readme":"[![Build Status](https://travis-ci.org/samccone/monocle.png?branch=master)](https://travis-ci.org/samccone/monocle)\n\n# Monocle -- a tool for watching things\n\n[![logo](https://raw.github.com/samccone/monocle/master/logo.png)](https://raw.github.com/samccone/monocle/master/logo.png)\n\nHave you ever wanted to watch a folder and all of its files/nested folders for changes. well now you can!\n\n## Installation\n\n```\nnpm install monocle\n```\n\n## Usage\n\n### Watch a directory:\n\n```js\nvar monocle = require('monocle')()\nmonocle.watchDirectory({\n  root: <root directory>,\n  fileFilter: <optional>,\n  directoryFilter: <optional>,\n  callback: fn(filename), //triggered on file change\n  complete: <fn> //file watching all set up\n});\n```\n\nThe two filters are passed through to `readdirp`.  More documentation can be found [here](https://github.com/thlorenz/readdirp#filters)\n\n### Watch a list of files:\n\n```js\nMonocle.watchFiles({\n  files: [], //path of file(s)\n  callback: <cb(filename)>, //triggered on file change\n  complete: <fn> //file watching all set up\n});\n```\n\n## Why not just use fs.watch ?\n\n  - file watching is really bad cross platforms in node\n  - you need to be smart when using fs.watch as compared to fs.watchFile\n  - Monocle takes care of this logic for you!\n  - windows systems use fs.watch\n  - osx and linux uses fs.watchFile\n\n\n## License\n\nBSD\n","readmeFilename":"README.md","_id":"monocle@0.1.41","dist":{"shasum":"decc2ad3d7e7fdc2ccfea76b13fd5300a9e9a14c","tarball":"http://registry-npm.ywwl.com/monocle/download/monocle-0.1.41.tgz","integrity":"sha512-AlhSW/5WQmrw9/VgZN/0IYiL7J+AoZmGbaV0XWkiWhPp/JLAkXAnTC5eHQx9QC72/crYUuA3cJbqNwGpRy5DoA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdMYFJi9wqoxF1oreRyGMaflwvDE8RwpvI4f+qUbWVyAIhAMV5llMBKktJrz0xB6V02FSGsxQEhNdC7suDY1dI/eOb"}],"size":28922,"noattachment":false,"key":"/monocle/-/monocle-0.1.41.tgz"},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"samccone","email":"samccone@gmail.com"},"maintainers":[{"name":"samccone","email":"samccone@gmail.com"}],"publish_time":1366077992011,"_cnpm_publish_time":1366077992011,"dist-tags":{"latest":"1.1.51"}}