find-monorepo-root
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

find-monorepo-root

Find the root directory of a monorepo using Yarn workspaces, Bolt, Lerna or pnpm

MIT License Language PRs Welcome

build coverage NPM Package NPM Downloads

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

Package Sidebar

Install

npm i find-monorepo-root

Weekly Downloads

39

Version

1.0.3

License

MIT

Unpacked Size

19.2 kB

Total Files

24

Last publish

Collaborators

  • bubkoo