An open API service indexing awesome lists of open source software.

https://github.com/bubkoo/find-monorepo-root

Find the root directory of a monorepo using Yarn workspaces, Bolt, Lerna or pnpm
https://github.com/bubkoo/find-monorepo-root

lerna-monorepo monorepo pnpm-workspaces workspaces yarn-workspaces

Last synced: 7 months ago
JSON representation

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

Awesome Lists containing this project

README

          

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
```shell
$ npm install find-monorepo-root
```

## Usage

```ts
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](https://github.com/bubkoo/find-monorepo-root/issues) for bug reports or suggestions first.

To become a contributor, please follow our [contributing guide](/CONTRIBUTING.md).

## License

The scripts and documentation in this project are released under the [MIT License](LICENSE)