{"name":"package-directory","version":"0.1.6","author":{"name":"Filip Dalüge","email":"filip.daluge@checle.com"},"license":"MIT","_id":"package-directory@0.1.6","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":"b6f14ad5029a288193d83f2f274cbdfb62eef360","tarball":"http://registry-npm.ywwl.com/package-directory/download/package-directory-0.1.6.tgz","integrity":"sha512-muV1RNCIFVMSklZh+keYABrBGlaLT65iUNxgvYeZy1y6z/aiJUPaAj5i4Gc+c25Ao2/ugP0LLA6Dun2V1ehJIw==","signatures":[{"sig":"MEUCIQD34INwsVi4B6vU2jSAwZ59MbKNIVy/G6JxHka9ISWSFQIgH6/JXrmPgpP4ddpxbUJb+3vt71SqZlejgmk+5GLS6kA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":2193,"noattachment":false,"key":"/package-directory/-/package-directory-0.1.6.tgz"},"_from":".","_shasum":"b6f14ad5029a288193d83f2f274cbdfb62eef360","gitHead":"fa573dcae849ad6c9a51602f30d60df5ab642006","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.1.6.tgz_1495208849288_0.5828337741550058","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":1495208850273,"_cnpm_publish_time":1495208850273,"dist-tags":{"latest":"8.2.0"}}