Find the root directory of any given monorepo (works with npm, yarn, pnpm, turbo, etc.)
npm install identify-monorepo-root
Find the root directory of any given monorepo (works with npm, yarn, pnpm, turbo, etc.).
Can be used as command line / cli tool, or as classical dependency.
Via npm:
``bash`
npm i -g identify-monorepo-root
Via yarn:
`bash`
yarn global add identify-monorepo-root
:`bash
npx identify-monorepo-root
`$3
After installation you can use it by running the following command inside any given repository.
`bash
identify-monorepo-root
`Of course you don't have to necessarily be in the root directory of the repo, otherwise this would defeat this library's purpose 🤓.
Classical dependency
$3
`
npm install --save identify-monorepo-root
`Or if you use Yarn:
`
yarn add identify-monorepo-root
`$3
`Typescript
import { identifyMonorepoRoot } from "identify-monorepo-root";const monorepoRoot: string = identifyMonorepoRoot();
``