@node-kit/monorepo
v3.2.0
Published
Some simple utilities for nodejs
Downloads
49
Readme
@node-kit/monorepo
Some simple utilities for nodejs
Function list
- some shared utilities: @node-kit/utils
- some shared extra utilities for nodejs build-in fs modules: @node-kit/extra.fs
- some shared extra utilities for nodejs build-in path modules: @node-kit/extra.path
- some shared extra utilities for nodejs build-in child_process modules: @node-kit/extra.cp
- find lerna workspace root: @node-kit/lerna-workspace-root
- find pnpm workspace root: @node-kit/pnpm-workspace-root
- find yarn workspace root: @node-kit/yarn-workspace-root
- find workspace root: workspace-root
- find monorepo root (alias of workspace-root): monorepo-root
- get workspace project list: workspace-projects
- get workspace project list: workspace-pkgs
- get lerna workspace info: @node-kit/lerna-workspace-info
- get pnpm workspace info: @node-kit/pnpm-workspace-info
- get yarn workspace info: @node-kit/yarn-workspace-info
- get workspace info: @node-kit/workspace-info
- find the package manager information: pm-info
- find which package manager used in the project: @node-kit/which-pm
- Detects what package manager was used for installation: what-pm
- Get the system lang: os-lang
Install
e.g: use workspace-root
# by pnpm
pnpm install workspace-root
# by npm
npm install -D workspace-root
# by yarn
yarn add workspace-root
Usage
import { workspaceRoot } from 'workspace-root'
workspaceRoot().then(path => {
console.log('The workspace root is: ', path) // /Users/user/path/of/package/root or null
})
Issues & Support
Please open an issue here.