0.0.10 • Published 3 years ago
mrex v0.0.10
mrex
mrex is short for monorepo exec
Run package scripts for every package in a monorepo that uses workspaces, with respect to the order of inclusion.
Motivation
Assume a monorepo with a structure like this:
some-monorepo
-- packages
---- packageA
---- packageB
---- packageCwhere
- packageA depends on packageB and packageC,
- packageB depends on packageC
Then the correct order for running, let's say, a build command, would be
- packageC
- packageB
- packageA
But older yarn versions don't account for dependencies between packages in a workspace.
This package was created to solve this problem.
Installation
npm i -D mrexor
yarn add -D mrexor
pnpm i -D mrexUsage:
npm run mrex <command>or
yarn mrex <command>or
pnpm mrex <command>For example:
yarn mrex buildRuns a build script in every package, in correct order.
mrex will detect npm, yarn or pnpm workspaces and run the command with the proper package manager.