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

1.0.7 • Public • Published

identify-monorepo-root 🌱

Version

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();

/identify-monorepo-root/

    Package Sidebar

    Install

    npm i identify-monorepo-root

    Weekly Downloads

    587

    Version

    1.0.7

    License

    MIT

    Unpacked Size

    8.58 kB

    Total Files

    10

    Last publish

    Collaborators

    • maks-io