{
  "_args": [
    [
      {
        "raw": "sane@^1.6.0",
        "scope": null,
        "escapedName": "sane",
        "name": "sane",
        "rawSpec": "^1.6.0",
        "spec": ">=1.6.0 <2.0.0",
        "type": "range"
      },
      "/home/travis/build/lukesargeant/ember-sparkline/node_modules/ember-cli"
    ]
  ],
  "_from": "sane@>=1.6.0 <2.0.0",
  "_id": "sane@1.7.0",
  "_inCache": true,
  "_location": "/sane",
  "_nodeVersion": "7.7.3",
  "_npmOperationalInternal": {
    "host": "s3://npm-registry-packages",
    "tmp": "tmp/sane-1.7.0.tgz_1495489177305_0.5727649950422347"
  },
  "_npmUser": {
    "name": "amasad",
    "email": "amjad.masad@gmail.com"
  },
  "_npmVersion": "4.1.2",
  "_phantomChildren": {},
  "_requested": {
    "raw": "sane@^1.6.0",
    "scope": null,
    "escapedName": "sane",
    "name": "sane",
    "rawSpec": "^1.6.0",
    "spec": ">=1.6.0 <2.0.0",
    "type": "range"
  },
  "_requiredBy": [
    "/ember-cli",
    "/ember-cli-broccoli-sane-watcher"
  ],
  "_resolved": "https://registry.npmjs.org/sane/-/sane-1.7.0.tgz",
  "_shasum": "b3579bccb45c94cf20355cc81124990dfd346e30",
  "_shrinkwrap": null,
  "_spec": "sane@^1.6.0",
  "_where": "/home/travis/build/lukesargeant/ember-sparkline/node_modules/ember-cli",
  "author": {
    "name": "amasad"
  },
  "bin": {
    "sane": "./src/cli.js"
  },
  "bugs": {
    "url": "https://github.com/amasad/sane/issues"
  },
  "dependencies": {
    "anymatch": "^1.3.0",
    "exec-sh": "^0.2.0",
    "fb-watchman": "^2.0.0",
    "minimatch": "^3.0.2",
    "minimist": "^1.1.1",
    "walker": "~1.0.5",
    "watch": "~0.10.0"
  },
  "description": "Sane aims to be fast, small, and reliable file system watcher.",
  "devDependencies": {
    "jshint": "^2.5.10",
    "mocha": "~1.17.1",
    "rimraf": "~2.2.6",
    "tmp": "0.0.27"
  },
  "directories": {},
  "dist": {
    "shasum": "b3579bccb45c94cf20355cc81124990dfd346e30",
    "tarball": "https://registry.npmjs.org/sane/-/sane-1.7.0.tgz"
  },
  "engines": {
    "node": ">=0.6.0"
  },
  "files": [
    "src",
    "index.js"
  ],
  "gitHead": "52ca8fe6d433325698309928545d0fe23a3a1219",
  "homepage": "https://github.com/amasad/sane",
  "keywords": [
    "watch",
    "file",
    "fswatcher",
    "watchfile",
    "fs",
    "watching"
  ],
  "license": "MIT",
  "main": "index.js",
  "maintainers": [
    {
      "name": "amasad",
      "email": "amjad.masad@gmail.com"
    },
    {
      "name": "stefanpenner",
      "email": "stefan.penner@gmail.com"
    }
  ],
  "name": "sane",
  "optionalDependencies": {},
  "readme": "[![CircleCI](https://circleci.com/gh/amasad/sane.svg?style=svg)](https://circleci.com/gh/amasad/sane)\n\nsane\n----\n\nI've been driven to insanity by node filesystem watcher wrappers.\nSane aims to be fast, small, and reliable file system watcher. It does that by:\n\n* By default stays away from fs polling because it's very slow and cpu intensive\n* Uses `fs.watch` by default and sensibly works around the various issues\n* Maintains a consistent API across different platforms\n* Where `fs.watch` is not reliable you have the choice of using the following alternatives:\n  * [the facebook watchman library](https://facebook.github.io/watchman/)\n  * polling\n\n## Install\n\n```\n$ npm install sane\n```\n\n## How to choose a mode\n\nDon't worry too much about choosing the correct mode upfront because sane\nmaintains the same API across all modes and will be easy to switch.\n\n* If you're only supporting Linux and OS X, `watchman` would be the most reliable mode\n* If you're using node > v0.10.0 use the default mode\n* If you're running OS X and you're watching a lot of directories and you're running into https://github.com/joyent/node/issues/5463, use `watchman`\n* If you're in an environment where native file system events aren't available (like Vagrant), you should use polling\n* Otherwise, the default mode should work well for you\n\n## API\n\n### sane(dir, options)\n\nWatches a directory and all it's descendant directories for changes, deletions, and additions on files and directories.\n\n```js\nvar watcher = sane('path/to/dir', {glob: ['**/*.js', '**/*.css']});\nwatcher.on('ready', function () { console.log('ready') });\nwatcher.on('change', function (filepath, root, stat) { console.log('file changed', filepath); });\nwatcher.on('add', function (filepath, root, stat) { console.log('file added', filepath); });\nwatcher.on('delete', function (filepath, root) { console.log('file deleted', filepath); });\n// close\nwatcher.close();\n```\n\noptions:\n\n* `glob`: a single string glob pattern or an array of them.\n* `poll`: puts the watcher in polling mode. Under the hood that means `fs.watchFile`.\n* `watchman`: makes the watcher use [watchman](https://facebook.github.io/watchman/).\n* `dot`: enables watching files/directories that start with a dot.\n* `ignored`: a glob, regex, function, or array of any combination.\n\nFor the glob pattern documentation, see [minimatch](https://github.com/isaacs/minimatch).\nIf you choose to use `watchman` you'll have to [install watchman yourself](https://facebook.github.io/watchman/docs/install.html)).\nFor the ignored options, see [anymatch](https://github.com/es128/anymatch).\n\n### sane.NodeWatcher(dir, options)\n\nThe default watcher class. Uses `fs.watch` under the hood, and takes the same options as `sane(options, dir)`.\n\n### sane.WatchmanWatcher(dir, options)\n\nThe watchman watcher class. Takes the same options as `sane(options, dir)`.\n\n### sane.PollWatcher(dir, options)\n\nThe polling watcher class. Takes the same options as `sane(options, dir)` with the addition of:\n\n* interval: indicates how often the files should be polled. (passed to fs.watchFile)\n\n### sane.{Node|Watchman|Poll}Watcher#close\n\nStops watching.\n\n### sane.{Node|Watchman|Poll}Watcher events\n\nEmits the following events:\n\nAll events are passed the file/dir path relative to the root directory\n* `ready` when the program is ready to detect events in the directory\n* `change` when a file changes\n* `add` when a file or directory has been added\n* `delete` when a file or directory has been deleted\n\n## CLI\n\nThis module includes a simple command line interface, which you can install with `npm install sane -g`.\n\n```\nUsage: sane <command> [...directory] [--glob=<filePattern>] [--poll] [--watchman] [--dot] [--wait=<seconds>]\n\nOPTIONS:\n    --glob=<filePattern>\n        A single string glob pattern or an array of them.\n\n    --poll, -p\n      Use polling mode.\n\n    --watchman, -w\n      Use watchman (if available).\n\n    --dot, -d\n      Enables watching files/directories that start with a dot.\n\n    --wait=<seconds>\n        Duration, in seconds, that watching will be disabled\n        after running <command>. Setting this option will\n        throttle calls to <command> for the specified duration.\n```\n\nIt will watch the given `directory` and run the given <command> every time a file changes.\n\n### CLI example usage\n- `sane 'echo \"A command ran\"'`\n- `sane 'echo \"A command ran\"' --glob='**/*.css'`\n- `sane 'echo \"A command ran\"' site/assets/css --glob='**/*.css'`\n- `sane 'echo \"A command ran\"' --wait=3`\n- `sane 'echo \"A command ran\"' -p`\n\n## License\n\nMIT\n\n## Credits\nThe CLI was originally based on the [watch CLI](https://github.com/mikeal/watch). Watch is licensed under the Apache License Version 2.0.\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/amasad/sane.git"
  },
  "scripts": {
    "prepublish": "jshint --config=.jshintrc src/ index.js && mocha --bail",
    "test": "jshint --config=.jshintrc src/ index.js && mocha --bail test/test.js && mocha --bail test/utils-test.js",
    "test:debug": "mocha debug --bail"
  },
  "version": "1.7.0"
}
