Monorepos
This NPM package contains a CLI (Command Line Interface) that helps developers managing
monorepos. Before creating
this NPM package, we have tried lerna
and FormidableLabs/builder. None of them solved the problem
the way we expected and we had a hard time trying to integrating them with CI/CD tools like Travis.
Hence, we have created this package.
Usage
First of all, you will need to install this package:
npm i -D @digituz/monorepo
After that, you can start using the monorepo
CLI. For now, the available options are:
-
bootstrap
: Merges the mainpackage.json
file with thepackage.ext.json
file provided by the package and installs dependencies. -
bump
: Takes the bump type (must bepatch
,minor
, ormajor
) and bumps the package accordingly. -
clean
: Removes mainnode_modules
directory and then removesnode_modules
andpackage.json
from internal packages. -
publish
: Publishes new versions to NPM. -
runScript
: Runs a script on one or more internal packages. -
test
: Runsnpm test
on one or more internal packages.
Here, you can see a few examples on how to use it:
# runs tests for all packages
monorepo test
# runs tests for a single package called Button
monorepo test -p Button
# runs a minor bump to Input and Button
monorepo bump -p Button Input -b minor