Package detail

@node-kit/workspace-root

saqqdy19MITdeprecated1.3.4

This package has been deprecated and is no longer maintained. Please use workspace-root.

A simple utility to get the workspace root

node-kit, workspace, lerna-workspace, pnpm-workspace

readme

# @node-kit/workspace-root A simple utility to get the workspace root NPM version Codacy Badge Test coverage License Sonar

Install

# use pnpm
$ pnpm install -D @node-kit/workspace-root

# use yarn
$ yarn add -D @node-kit/workspace-root

# use npm
$ npm install -D @node-kit/workspace-root

Usage

  1. use @node-kit/workspace-root in async mode
import { workspaceRoot } from '@node-kit/workspace-root'

workspaceRoot().then(path => {
  console.log('The workspace root is: ', path) // /Users/user/path/of/package/root or null
})
  1. use @node-kit/workspace-root in sync mode
import { workspaceRootSync } from '@node-kit/workspace-root'

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

Issues & Support

Please open an issue here.

License

MIT

changelog

Change Logs

2023.01.23 v1.3.4

  1. use reinstaller: reinstaller
  2. upgrade all packages

2023.01.22 v1.3.3

  1. fix pnpm-workspace-info bugs

2023.01.22 v1.3.2

  1. fix lerna-workspace-info pnpm-workspace-info yarn-workspace-info to get dirname

2023.01.22 v1.3.1

  1. fix lerna-workspace-info pnpm-workspace-info yarn-workspace-info to return null

2023.01.22 v1.3.0

  1. add workspace-projects, api docs: README.md
  2. add lerna-workspace-info, api docs: README.md
  3. add pnpm-workspace-info, api docs: README.md
  4. add yarn-workspace-info, api docs: README.md
  5. add workspace-info, api docs: README.md

2023.01.18 v1.2.1

  1. fix which-pm bin path error
  2. add whichpm bin path

2023.01.18 v1.2.0

  1. add which-pm, api docs: README.md
  2. use module type

2023.01.18 v1.1.0

  1. add pm-info, api docs: README.md

2023.01.18 v1.0.0

  1. add utils lerna-workspace-root pnpm-workspace-root yarn-workspace-root workspace-root monorepo-root which-pm pm-info
  2. api docs: README.md