JSPM

  • Created
  • Published
  • Downloads 2157
  • Score
    100M100P100Q143874F
  • License MIT

A simple utility to get the monorepo root

Package Exports

  • monorepo-root
  • monorepo-root/index

Readme

monorepo-root

A simple utility to get the monorepo root

NPM version Codacy Badge Test coverage License

Sonar

Install

# use pnpm
$ pnpm install -D monorepo-root

# use yarn
$ yarn add -D monorepo-root

# use npm
$ npm install -D monorepo-root

Usage

  1. use monorepo-root in async mode
import { monorepoRoot } from 'monorepo-root'

monorepoRoot().then(path => {
  console.log('The monorepo root is: ', path) // /Users/user/path/of/package/root or null
})
  1. use monorepo-root in sync mode
import { monorepoRootSync } from 'monorepo-root'

console.log('The monorepo root is: ', monorepoRootSync()) // /Users/user/path/of/package/root or null

Issues & Support

Please open an issue here.

License

MIT