monorepo-utils

0.0.8 • Public • Published

monorepo-utils

Utility providing various options for a monorepo

During migration to Monorepo , or even after migrating we will require couple of utilities. Below are the list of utilities

Config File Structure

Config File to be supplied, should be like this

{
    "specialPackages":[
        "escape-string-regexp"
    ],
    "packagesInWS":[
        "camelcase"
    ],
    "excludedPackages":[
        "abc"
    ],
    "appliedRules":[
        "has-prefix"
    ]
}

How to Use ?

Install the package

 npm install monorepo-utils --save-dev

Add it in script

"scripts": {
        "helper": "monorepo-utils"
    },

Run the commands

npm run helper -- --cmd ls-pkg --rootDir ./directoryname

Replace workspace with packages not in Config

Consider a scenario wherein there are few packages in workspace and few are not, and we want to process process it(build & release it) we can use below command

 --cmd replace-pkgs-not-in-ws --rootDir ./nodeDirec  
 --pL ./package.json 
 --cL ./config.json

Print List of Modules in the directories

 --cmd ls-pkg
 --rootDir ./nodeDirec  

Readme

Keywords

none

Package Sidebar

Install

npm i monorepo-utils

Weekly Downloads

0

Version

0.0.8

License

ISC

Unpacked Size

8.44 kB

Total Files

7

Last publish

Collaborators

  • deviator206