Crates.io | morp |
lib.rs | morp |
version | 0.1.0 |
source | src |
created_at | 2019-02-01 15:15:26.962284 |
updated_at | 2019-02-01 15:15:26.962284 |
description | Utilities for javascript monorepos |
homepage | https://github.com/elaye/morp |
repository | https://github.com/elaye/morp |
max_upload_size | |
id | 112012 |
size | 13,957 |
morp
is a command line that provides utilities for working with javascript monorepos.
cargo install morp
You may need to add the Cargo bins install directory to your $PATH
to be able to run morp
.
packages
directory located at the root of the monorepo.name
key in the package.json
file of your packages must match the name of the package directory in packages
monorepo
├── package.json
├── packages
│ ├── foo
│ │ ├── package.json -> `name` key must be `foo`
│ │ └── ...
│ └── ...
└── ...
This command outputs a graph of the interdependencies between the monorepo packages.
--path -p
path of the monorepo
Print the name of the changed packages compared to a branch, taking into account dependent packages.
Let's say you have 3 packages, A
, B
and C
. Package B
depends on A
and package C
doesn't depend on anything.
If you make a change in package A
, then morp diff
will output this:
A
B
This can be useful for CI purposes, if you want to trigger jobs depending on changed packages.
This command works by first looking for a common ancestor between HEAD
and the branch you specified (or develop
by default).
Once we have this common ancestor (ca
), we check which packages changed between ca
and HEAD
and the packages depending on these.
--path -p
path of the monorepo
--branch -b
branch to use as a reference for changed packages
--prefix
add a prefix to each package in the packages output