Skip to content

ssupinsky/mrex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
---- packageC

where

  • 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 mrex

or

yarn add -D mrex

or

pnpm i -D mrex

Usage:

npm run mrex <command>

or

yarn mrex <command>

or

pnpm mrex <command>

For example:

yarn mrex build

Runs 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.

About

Exec a command in each package in a monorepo, respecting the order of dependencies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published