{"name":"package-directory","version":"0.2.3","author":{"name":"Filip Dalüge","email":"filip.daluge@checle.com"},"license":"MIT","_id":"package-directory@0.2.3","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":"0daf7bccfd9384149dd2ba53da9917179cb70858","tarball":"http://registry-npm.ywwl.com/package-directory/download/package-directory-0.2.3.tgz","integrity":"sha512-eD4tECUTup0xRXc/Qi7ZXZYpPVr7/6q1EMxgWkJsMF4csi8RZ8DDMRI/tF5soZfYupeNUOp7dDppYYakbs8rKA==","signatures":[{"sig":"MEYCIQDMwd2e/DAMb5xsT2jDrnPeGvNIdrET0C3OhfHvpnTPGQIhAKZCrLzrHBwEZNm3KTdcOmp/bwHqiffZ6ssaP5rSXX4i","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":2244,"noattachment":false,"key":"/package-directory/-/package-directory-0.2.3.tgz"},"_from":".","_shasum":"0daf7bccfd9384149dd2ba53da9917179cb70858","gitHead":"50cd0711d73c0a5f0771dd0fb57dcc73a784f22a","scripts":{"preinstall":"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.3.tgz_1495210917727_0.8348540863953531","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":1495210918639,"_cnpm_publish_time":1495210918639,"dist-tags":{"latest":"8.2.0"}}