Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saqqdy/node-kit
Some simple utilities for nodejs
https://github.com/saqqdy/node-kit
monorepo monorepo-root node-kit nodejs-tool utilities which-pm workspace workspace-info
Last synced: about 2 months ago
JSON representation
Some simple utilities for nodejs
- Host: GitHub
- URL: https://github.com/saqqdy/node-kit
- Owner: saqqdy
- License: mit
- Created: 2023-01-14T11:53:28.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-24T06:25:33.000Z (10 months ago)
- Last Synced: 2024-04-24T13:27:56.798Z (8 months ago)
- Topics: monorepo, monorepo-root, node-kit, nodejs-tool, utilities, which-pm, workspace, workspace-info
- Language: TypeScript
- Homepage:
- Size: 822 KB
- Stars: 18
- Watchers: 2
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# @node-kit/monorepo
Some simple utilities for nodejs
[![NPM version][npm-image]][npm-url]
[![Codacy Badge][codacy-image]][codacy-url]
[![License][license-image]][license-url][![Sonar][sonar-image]][sonar-url]
## Function list
- some shared utilities: [@node-kit/utils](https://github.com/saqqdy/node-kit/tree/master/packages/utils)
- some shared extra utilities for nodejs build-in fs modules: [@node-kit/extra.fs](https://github.com/saqqdy/node-kit/tree/master/packages/extra/fs)
- some shared extra utilities for nodejs build-in path modules: [@node-kit/extra.path](https://github.com/saqqdy/node-kit/tree/master/packages/extra/path)
- some shared extra utilities for nodejs build-in child_process modules: [@node-kit/extra.cp](https://github.com/saqqdy/node-kit/tree/master/packages/extra/cp)
- find lerna workspace root: [@node-kit/lerna-workspace-root](https://github.com/saqqdy/node-kit/tree/master/packages/lerna-workspace-root)
- find pnpm workspace root: [@node-kit/pnpm-workspace-root](https://github.com/saqqdy/node-kit/tree/master/packages/pnpm-workspace-root)
- find yarn workspace root: [@node-kit/yarn-workspace-root](https://github.com/saqqdy/node-kit/tree/master/packages/yarn-workspace-root)
- find workspace root: [workspace-root](https://github.com/saqqdy/node-kit/tree/master/packages/workspace-root)
- find monorepo root (alias of workspace-root): [monorepo-root](https://github.com/saqqdy/node-kit/tree/master/packages/monorepo-root)
- get workspace project list: [workspace-projects](https://github.com/saqqdy/node-kit/tree/master/packages/workspace-projects)
- get workspace project list: [workspace-pkgs](https://github.com/saqqdy/node-kit/tree/master/packages/workspace-pkgs)
- get lerna workspace info: [@node-kit/lerna-workspace-info](https://github.com/saqqdy/node-kit/tree/master/packages/lerna-workspace-info)
- get pnpm workspace info: [@node-kit/pnpm-workspace-info](https://github.com/saqqdy/node-kit/tree/master/packages/pnpm-workspace-info)
- get yarn workspace info: [@node-kit/yarn-workspace-info](https://github.com/saqqdy/node-kit/tree/master/packages/yarn-workspace-info)
- get workspace info: [@node-kit/workspace-info](https://github.com/saqqdy/node-kit/tree/master/packages/workspace-info)
- find the package manager information: [pm-info](https://github.com/saqqdy/node-kit/tree/master/packages/pm-info)
- find which package manager used in the project: [@node-kit/which-pm](https://github.com/saqqdy/node-kit/tree/master/packages/which-pm)
- Detects what package manager was used for installation: [what-pm](https://github.com/saqqdy/node-kit/tree/master/packages/what-pm)
- Get the system lang: [os-lang](https://github.com/saqqdy/node-kit/tree/master/packages/os-lang)## Install
e.g: use `workspace-root`
```shell
# by pnpm
pnpm install workspace-root# by npm
npm install -D workspace-root# by yarn
yarn add workspace-root
```## Usage
```js
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](https://github.com/saqqdy/node-kit/issues).
## License
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/@node-kit/monorepo.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@node-kit/monorepo
[codacy-image]: https://app.codacy.com/project/badge/Grade/f70d4880e4ad4f40aa970eb9ee9d0696
[codacy-url]: https://www.codacy.com/gh/saqqdy/@node-kit/monorepo/dashboard?utm_source=github.com&utm_medium=referral&utm_content=saqqdy/@node-kit/monorepo&utm_campaign=Badge_Grade
[license-image]: https://img.shields.io/badge/License-MIT-blue.svg
[license-url]: LICENSE
[sonar-image]: https://sonarcloud.io/api/project_badges/quality_gate?project=saqqdy_node-kit
[sonar-url]: https://sonarcloud.io/dashboard?id=saqqdy_node-kit