identify-monorepo-root
v1.0.8
Published
Find the root directory of any given monorepo (works with npm, yarn, pnpm, turbo, etc.)
Downloads
297
Maintainers
Readme
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.
CLI
Global install
Via npm:
npm i -g identify-monorepo-root
Via yarn:
yarn global add identify-monorepo-root
npx
Instead of a global install you can also use it via npx
:
npx identify-monorepo-root
Usage
After installation you can use it by running the following command inside any given repository.
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
Install
npm install --save identify-monorepo-root
Or if you use Yarn:
yarn add identify-monorepo-root
Usage
import { identifyMonorepoRoot } from "identify-monorepo-root";
const monorepoRoot: string = identifyMonorepoRoot();