@zero-version/monorepo.get-monorepo-meta
v9.9.14
Published
Monorepo utility.
Downloads
13
Maintainers
Readme
Monorepo utility.
Usage
Gets the solution directory as above, then searches down from there and any other package.json files it finds are assumed to be projects. It ignores any package.json files found in a node_modules directory.
import { getMonorepoMeta } from '@zero-version/monorepo.get-monorepo-meta';
console.log(getMonorepoMeta(process.cwd()));
// -> eg.
// {
// "solution": {
// "dir": "/dir/to/solution",
// "name": "<solution-name>",
// "description": "<solution-description>",
// "dependencies": {
// <solution-dependencies>
// },
// "devDependencies": {
// <solution-devDependencies>
// }
// },
// "projects": [
// {
// "dir": "/dir/to/solution/packages/project-1",
// "private": false,
// "name": "<project-1-name>",
// "description": "<project-1-description>",
// "dependencies": {
// <project-1-dependencies>
// },
// "devDependencies": {
// <project-1-devDependencies>
// }
// },
// {
// "dir": "/dir/to/solution/packages/project-2",
// "private": false,
// "name": "<project-2-name>",
// "description": "<project-2-description>",
// "dependencies": {
// <project-2-dependencies>
// },
// "devDependencies": {
// <project-2-devDependencies>
// }
// },
// ]
// }
Support ☕
Are you using a package I've developed and finding it useful? Or have you looked at one of my repositories and learnt something new? If so, please consider buying me a coffee. Thanks!