{"_id":"fs-watch-tree","_rev":"204137","name":"fs-watch-tree","description":"Recursively watch directories for changes","dist-tags":{"latest":"0.2.5"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"time":{"modified":"2021-06-03T13:05:42.000Z","created":"2012-04-17T20:16:07.492Z","0.2.5":"2014-02-28T15:08:46.042Z","0.2.4":"2014-02-28T14:43:49.046Z","0.2.3":"2014-02-27T23:06:02.460Z","0.2.2":"2012-07-09T22:30:21.878Z","0.2.1":"2012-06-20T21:31:59.671Z","0.2.0":"2012-04-28T23:05:13.828Z","0.1.0":"2012-04-17T20:16:07.492Z"},"users":{"gillesruppert":true},"author":{"name":"Magnar Sveen"},"repository":{"type":"git","url":"https://github.com/busterjs/fs-watch-tree.git"},"versions":{"0.2.5":{"name":"fs-watch-tree","version":"0.2.5","description":"Recursively watch directories for changes","homepage":"http://busterjs.org/doc/fs-watch-tree","author":{"name":"Magnar Sveen"},"contributors":[{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},{"name":"August Lilleaas","email":"august.lilleaas@gmail.com","url":"http://augustl.com"},{"name":"Magnar Sveen","email":"magnars@gmail.com"},{"name":"Stein Magnus Jodal","email":"stein.magnus@jodal.no","url":"http://jodal.no"}],"main":"./lib/fs-watch-tree","repository":{"type":"git","url":"https://github.com/busterjs/fs-watch-tree.git"},"scripts":{"test":"node run-tests.js"},"dependencies":{"when":"https://github.com/cujojs/when/tarball/1.3.0","minimatch":"~0.2"},"devDependencies":{"buster-node":"0.1","rimraf":"*"},"bugs":{"url":"https://github.com/busterjs/fs-watch-tree/issues"},"_id":"fs-watch-tree@0.2.5","dist":{"shasum":"b48a014c9830ff53e52356ea23056c1c0d6cb92d","size":13777,"noattachment":false,"key":"/fs-watch-tree/-/fs-watch-tree-0.2.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-watch-tree/download/fs-watch-tree-0.2.5.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"dwittner","email":"d.wittner@gmx.de"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"directories":{},"publish_time":1393600126042,"_cnpm_publish_time":1393600126042,"deprecated":"This package is outdated and not actively maintained.","_hasShrinkwrap":false},"0.2.4":{"name":"fs-watch-tree","version":"0.2.4","description":"Recursively watch directories for changes","homepage":"http://busterjs.org/doc/fs-watch-tree","author":{"name":"Magnar Sveen"},"contributors":[{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},{"name":"August Lilleaas","email":"august.lilleaas@gmail.com","url":"http://augustl.com"},{"name":"Magnar Sveen","email":"magnars@gmail.com"},{"name":"Stein Magnus Jodal","email":"stein.magnus@jodal.no","url":"http://jodal.no"}],"main":"./lib/fs-watch-tree","repository":{"type":"git","url":"https://github.com/busterjs/fs-watch-tree.git"},"scripts":{"test":"node run-tests.js"},"dependencies":{"when":"https://github.com/cujojs/when/tarball/1.3.0","minimatch":"~0.2"},"devDependencies":{"buster-node":"0.1","rimraf":"*"},"bugs":{"url":"https://github.com/busterjs/fs-watch-tree/issues"},"_id":"fs-watch-tree@0.2.4","dist":{"shasum":"522d693a61919c345dd2c4e2282da9552e4307c4","size":13872,"noattachment":false,"key":"/fs-watch-tree/-/fs-watch-tree-0.2.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-watch-tree/download/fs-watch-tree-0.2.4.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"dwittner","email":"d.wittner@gmx.de"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"directories":{},"publish_time":1393598629046,"_cnpm_publish_time":1393598629046,"deprecated":"This package is outdated and not actively maintained.","_hasShrinkwrap":false},"0.2.3":{"name":"fs-watch-tree","version":"0.2.3","description":"Recursively watch directories for changes","homepage":"http://busterjs.org/doc/fs-watch-tree","author":{"name":"Magnar Sveen"},"contributors":[{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},{"name":"August Lilleaas","email":"august.lilleaas@gmail.com","url":"http://augustl.com"},{"name":"Magnar Sveen","email":"magnars@gmail.com"},{"name":"Stein Magnus Jodal","email":"stein.magnus@jodal.no","url":"http://jodal.no"}],"main":"./lib/fs-watch-tree","repository":{"type":"git","url":"https://github.com/busterjs/fs-watch-tree.git"},"scripts":{"test":"node run-tests.js"},"dependencies":{"when":"https://github.com/cujojs/when/tarball/1.3.0","minimatch":"~0.2"},"devDependencies":{"buster-node":"0.1","rimraf":"*"},"bugs":{"url":"https://github.com/busterjs/fs-watch-tree/issues"},"_id":"fs-watch-tree@0.2.3","dist":{"shasum":"1f1863cfd5d1cf4b8d963d5f4c9f437df2e03ec0","size":13872,"noattachment":false,"key":"/fs-watch-tree/-/fs-watch-tree-0.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-watch-tree/download/fs-watch-tree-0.2.3.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"dwittner","email":"d.wittner@gmx.de"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"directories":{},"publish_time":1393542362460,"_cnpm_publish_time":1393542362460,"deprecated":"This package is outdated and not actively maintained.","_hasShrinkwrap":false},"0.2.2":{"name":"fs-watch-tree","version":"0.2.2","description":"Recursively watch directories for changes","homepage":"http://busterjs.org/doc/fs-watch-tree","author":{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},"contributors":[{"name":"August Lilleaas","email":"august.lilleaas@gmail.com","url":"http://augustl.com"},{"name":"Magnar Sveen","email":"magnars@gmail.com"}],"main":"./lib/fs-watch-tree","repository":{"type":"git","url":"git://github.com/busterjs/fs-watch-tree.git"},"scripts":{"test":"./node_modules/buster/bin/buster-test"},"dependencies":{"when":"https://github.com/cujojs/when/tarball/1.3.0"},"devDependencies":{"buster":"*","rimraf":"*"},"_npmUser":{"name":"cjohansen","email":"christian@cjohansen.no"},"_id":"fs-watch-tree@0.2.2","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.6.5","_defaultsLoaded":true,"dist":{"shasum":"ded130c1e9b0dde46ff11e6c4b21a6ba06dd65ad","size":11373,"noattachment":false,"key":"/fs-watch-tree/-/fs-watch-tree-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-watch-tree/download/fs-watch-tree-0.2.2.tgz"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"directories":{},"publish_time":1341873021878,"_cnpm_publish_time":1341873021878,"deprecated":"This package is outdated and not actively maintained.","_hasShrinkwrap":false},"0.2.1":{"name":"fs-watch-tree","version":"0.2.1","description":"Recursively watch directories for changes","homepage":"http://busterjs.org/doc/fs-watch-tree","author":{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},"contributors":[{"name":"August Lilleaas","email":"august.lilleaas@gmail.com","url":"http://augustl.com"},{"name":"Magnar Sveen","email":"magnars@gmail.com"}],"main":"./lib/fs-watch-tree","repository":{"type":"git","url":"git://github.com/busterjs/fs-watch-tree.git"},"scripts":{"test":"./node_modules/buster/bin/buster-test"},"dependencies":{"when":"~1.3"},"devDependencies":{"buster":"*","rimraf":"*"},"_npmUser":{"name":"cjohansen","email":"christian@cjohansen.no"},"_id":"fs-watch-tree@0.2.1","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.6.5","_defaultsLoaded":true,"dist":{"shasum":"6cb86d59dcb5edd144fdc44f60a9dace7979dd2a","size":11356,"noattachment":false,"key":"/fs-watch-tree/-/fs-watch-tree-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-watch-tree/download/fs-watch-tree-0.2.1.tgz"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"directories":{},"publish_time":1340227919671,"_cnpm_publish_time":1340227919671,"deprecated":"This package is outdated and not actively maintained.","_hasShrinkwrap":false},"0.2.0":{"name":"fs-watch-tree","version":"0.2.0","description":"Recursively watch directories for changes","homepage":"http://busterjs.org/doc/fs-watch-tree","author":{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},"contributors":[{"name":"August Lilleaas","email":"august.lilleaas@gmail.com","url":"http://augustl.com"},{"name":"Magnar Sveen","email":"magnars@gmail.com"}],"main":"./lib/fs-watch-tree","repository":{"type":"git","url":"git://github.com/busterjs/fs-watch-tree.git"},"dependencies":{"when":"https://github.com/cujojs/when/tarball/1.0.2"},"devDependencies":{"rimraf":"*"},"_npmUser":{"name":"cjohansen","email":"christian@cjohansen.no"},"_id":"fs-watch-tree@0.2.0","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.6.5","_defaultsLoaded":true,"dist":{"shasum":"ce1593c2e72f0824828bbed1303618f944074d5c","size":11171,"noattachment":false,"key":"/fs-watch-tree/-/fs-watch-tree-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-watch-tree/download/fs-watch-tree-0.2.0.tgz"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"directories":{},"publish_time":1335654313828,"_cnpm_publish_time":1335654313828,"deprecated":"This package is outdated and not actively maintained.","_hasShrinkwrap":false},"0.1.0":{"name":"fs-watch-tree","version":"0.1.0","description":"Recursively watch directories for changes","homepage":"http://busterjs.org/doc/fs-watch-tree","author":{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},"contributors":[{"name":"August Lilleaas","email":"august.lilleaas@gmail.com","url":"http://augustl.com"}],"main":"./lib/fs-watch-tree","repository":{"type":"git","url":"git://github.com/busterjs/fs-watch-tree.git"},"devDependencies":{"rimraf":"*"},"_npmUser":{"name":"cjohansen","email":"christian@cjohansen.no"},"_id":"fs-watch-tree@0.1.0","dependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.6.5","_defaultsLoaded":true,"dist":{"shasum":"0df82b5b0e638aad36b9433fea04411b4b14a3d1","size":5037,"noattachment":false,"key":"/fs-watch-tree/-/fs-watch-tree-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-watch-tree/download/fs-watch-tree-0.1.0.tgz"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"directories":{},"publish_time":1334693767492,"_cnpm_publish_time":1334693767492,"deprecated":"This package is outdated and not actively maintained.","_hasShrinkwrap":false}},"readme":"# fs-watch-tree #\r\n\r\n**Please note!** This package is outdated and not actively maintained. I would suggest looking at http://github.com/shama/gaze or https://github.com/paulmillr/chokidar.\r\n\r\n-----------------------------\r\n\r\n**fs-watch-tree** is a small tool to watch directories for changes recursively.\r\nIt uses\r\n[fs-watch](http://nodejs.org/docs/latest/api/fs.html#fs_fs_watch_filename_options_listener)\r\nto watch for changes, thus should work on most platforms.\r\n\r\n## Synopsis ##\r\n\r\n    var watchTree = require(\"fs-watch-tree\").watchTree;\r\n\r\n    var watch = watchTree(\"/home/christian\", function (event) {\r\n        // See description of event below\r\n    });\r\n\r\n    watch.end(); // Release watch\r\n\r\n    watch = watchTree(\"/home/christian\", {\r\n        exclude: [\"node_modules\", \"~\", \"#\", /^\\./]\r\n    }, function (event) {\r\n        // Respond to change\r\n    });\r\n\r\n## `watchTree(dir, callback)` ##\r\n\r\nWatches directory `dir` recursively for changes.\r\n\r\nThe callback is called with an `event` object. The event is described below.\r\n\r\n## `watchTree(dir, options, callback)` ##\r\n\r\nWatch a directory recursively, with some specific options. Currently, you can\r\nonly specify a single option:\r\n\r\n    { exclude: [] }\r\n\r\nThe `exclude` array specifies file patterns to exclude from watches. If a\r\npattern matches a directory, `watch-tree` will not recurse into it. If it\r\nmatches a file, changes to that file will not trigger an event.\r\n\r\nThe excludes can be either strings or regular expressions, but are always\r\ntreated as regular expressions. That means that\r\n\r\n    { exclude: [\".git\", \"node_modules\"] }\r\n\r\nWill be treated the same way as:\r\n\r\n    { exclude: [new RegExp(\".git\"), new RegExp(\"node_modules\")] }\r\n\r\nIf you only want to exclude specific files, be sure to provide full\r\npaths. `watch-tree` does not expand paths, it will resolve all paths relative to\r\nthe original directory. So this:\r\n\r\n    watchFile(\".git\", function (event) { /* ... *) });\r\n\r\nWill watch (and consider excludes for) directories like `.git/branches`. And\r\nthis:\r\n\r\n    watchFile(\"/home/christian/projects/watch-tree/.git\", function (event) {});\r\n\r\nWill watch (and consider excludes for) directories like\r\n`/home/christian/projects/watch-tree/.git`.\r\n\r\n## `event` ##\r\n\r\nThe event object has the following properties:\r\n\r\n### `name` ###\r\n\r\nThe full (relative) path to the file/directory that changed.\r\n\r\n### `isDirectory()` ###\r\n\r\nReturns true if the cause of the change was a directory. In some cases,\r\ne.g. when the directory was deleted, it's not possible to know if the\r\nsource was a directory. In that case, this method returns false.\r\n\r\n### `isMkdir()` ###\r\n\r\nReturns true if the cause of the event was a newly created directory.\r\n\r\n### `isDelete()` ###\r\n\r\nReturns true if the cause of the event was a deleted file/directory.\r\n\r\n### `isModify()` ###\r\n\r\nReturns true if the cause of the event was a modified file/directory.\r\n","_attachments":{},"homepage":"http://busterjs.org/doc/fs-watch-tree","bugs":{"url":"https://github.com/busterjs/fs-watch-tree/issues"}}