{"name":"package-directory","version":"0.2.0","author":{"name":"Filip Dalüge","email":"filip.daluge@checle.com"},"license":"MIT","_id":"package-directory@0.2.0","maintainers":[{"name":"daluege","email":"daluege@checle.com"}],"homepage":"https://github.com/daluege/package-directory","bugs":{"url":"https://github.com/daluege/package-directory/issues"},"dist":{"shasum":"1316c59c37dba638558681035c7a15c0b6681b7d","tarball":"http://registry-npm.ywwl.com/package-directory/download/package-directory-0.2.0.tgz","integrity":"sha512-No8aNwYgpoGm2sHycFjdUvPaSMWz2qh+dvg3gA5CufzUhPX5NvUOBf6ExaG117B9lfoXr4e0mIZK2V8jjYBPsQ==","signatures":[{"sig":"MEUCIQC+6atUEa89HriWKDegMCzeTTP3q3cet/YcD3M47nvDTQIgdki9m43ipswmYFiO6EAY5l8/3F4kKrUNFY0OUFNgRvo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":2239,"noattachment":false,"key":"/package-directory/-/package-directory-0.2.0.tgz"},"_from":".","_shasum":"1316c59c37dba638558681035c7a15c0b6681b7d","gitHead":"40a0e0b25da1cb1b8be7f73df2009ca837c6b82d","scripts":{"install":"node install.js"},"_npmUser":{"name":"daluege","email":"daluege@checle.com"},"repository":{"url":"git+https://github.com/daluege/package-directory.git","type":"git"},"_npmVersion":"4.2.0","description":"Specify a custom installation directory for local package.json dependencies","directories":{},"_nodeVersion":"7.10.0","dependencies":{"findup-sync":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/package-directory-0.2.0.tgz_1495209451496_0.04946747003123164","host":"s3://npm-registry-packages"},"readme":"# package-directory\n\n> Find the root directory of a Node.js project or npm package\n\n## Install\n\n```sh\nnpm install package-directory\n```\n\n## Usage\n\n```\n/\n└── Users\n    └── sindresorhus\n        └── foo\n            ├── package.json\n            └── bar\n                ├── baz\n                └── example.js\n```\n\n```js\n// example.js\nimport {packageDirectory} from 'package-directory';\n\nconsole.log(await packageDirectory());\n//=> '/Users/sindresorhus/foo'\n```\n\n## API\n\n### packageDirectory(option?)\n\nReturns a `Promise` for either the project root path or `undefined` if it could not be found.\n\n### packageDirectorySync(options?)\n\nReturns the project root path or `undefined` if it could not be found.\n\n#### options\n\nType: `object`\n\n##### cwd\n\nType: `string`\\\nDefault: `process.cwd()`\n\nThe directory to start searching from.\n\n##### ignoreTypeOnlyPackageJson\n\nType: `boolean`\\\nDefault: `false`\n\nIgnore `package.json` files that only contain the `type` field.\n\nThis treats `{\"type\":\"module\"}` files as ESM scope markers instead of package roots.\n\n## Related\n\n- [package-directory-cli](https://github.com/sindresorhus/package-directory-cli) - CLI for this package\n- [package-up](https://github.com/sindresorhus/package-up) - Find the closest package.json file\n- [find-up](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories\n","publish_time":1495209452424,"_cnpm_publish_time":1495209452424,"dist-tags":{"latest":"8.2.0"}}