find-monorepo-root
v1.0.3
Published
Find the root directory of a monorepo using Yarn workspaces, Bolt, Lerna or pnpm
Downloads
316
Maintainers
Readme
Install
$ npm install find-monorepo-root
Usage
import { findMonorepoRoot } from 'find-monorepo-root';
const cwd = process.cwd();
console.log(await findMonorepoRoot(cwd));
// {
// client: 'pnpm', // the monorepo client(pnpm, lerna, yarn, bolt)
// dir: 'xxx', // the monorepo root directory
// }
// sync method
import { findMonorepoRootSync } from 'find-monorepo-root/sync';
console.log(findMonorepoRootSync(cwd));
Contributing
Please let us know how can we help. Do check out issues for bug reports or suggestions first.
To become a contributor, please follow our contributing guide.
License
The scripts and documentation in this project are released under the MIT License