Neophobe Plebeian Mumpsimus

    @zero-version/monorepo.get-monorepo-meta
    TypeScript icon, indicating that this package has built-in type declarations

    9.9.14 • Public • Published

    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!

    Install

    npm i @zero-version/monorepo.get-monorepo-meta

    DownloadsWeekly Downloads

    4

    Version

    9.9.14

    License

    UNLICENSED

    Unpacked Size

    7.01 kB

    Total Files

    5

    Last publish

    Collaborators

    • andrewcrobertson