{"dist":{"shasum":"a1c15651a971c2d1c20de16fb3764460752f7c6d","tarball":"https://registry.npmjs.org/monocle/-/monocle-0.1.40.tgz","integrity":"sha512-FuGGwndCiatot3NhEsyD2XCzjYE1N3TpCM3VWo0hF44N7wYifHwspin6iQrVUMzN5GJZPb1I28TMXSa0muvkpQ==","signatures":[{"sig":"MEQCIBfdrtmqj9OJ+0zDiTT8JzmFpz86MdaAZjT/AQcfK3kdAiA5v22mbuZH/BVosmoyXiEnJS4a7OJtJJ2iCWoqTQiuMQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"monocle.js","name":"monocle","_from":".","author":{"name":"Sam Saccone"},"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## How to use\n\n`npm install monocle`\n\n`var Monocle = require('monocle')()`\n\n    Monocle.watchDirectory({\n      root: <root directory>,\n      fileFilter: <optional>,\n      directoryFilter: <optional>,\n      complete: <fn>, //triggered on file change\n      callback: fn(filename) //file watching all set up\n    });\n\n##### Or watch a list of files\n\n    Monocle.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## Why?\n#### Why not just use fs.watch ?\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## Filters\n\n- Read about it here [READDIRP](https://github.com/thlorenz/readdirp)\n","license":"BSD","scripts":{"test":"mocha test -R spec -t 2000"},"_npmUser":{"name":"samccone","email":"samccone@gmail.com"},"keywords":["watch","filesystem","folders","fs"],"repository":"","_npmVersion":"1.2.11","description":"a tool for watching directories for file changes","directories":{"test":"test"},"maintainers":[{"name":"samccone","email":"samccone@gmail.com"}],"dependencies":{"readdirp":"~0.2.3"},"readmeFilename":"README.md","devDependencies":{"mocha":"1.8.1"},"_id":"monocle@0.1.40","version":"0.1.40"}