monorepo

1.2.2 • Public • Published

monorepo

A CLI utility program for Node.js monorepo projects.

npm install monorepo --save-dev

build status npm version

Features

  • Adapters. Use either npm (default) or yarn.
  • Parallel. Runs package scripts and commands in parallel.

Motivation

lerna is pretty good, but seems bloated and messes up the output to stdout.

Usage

Add a monorepo.json to the root of the project. Example:

{
  "adapter": "npm",
  "packages": ["packages/*"]
}

To install all the sub-package dependencies, run:

monorepo install

To publish all the sub-package dependencies, run:

monorepo publish

To run the test script in each of the packages, run:

monorepo run test

API

monorepo(args, flags, opts, cb)

monorepo may be used as a Node.js module:

const monorepo = require('monorepo')
 
monorepo(
  ['test'],
  {adapter: 'yarn', quiet: true},
  {cwd: path.resolve(__dirname, 'path/to/root')},
  err => {
    if (err) {
      console.error(err.message)
      process.exit(err.code || 1)
    }
  }
)

/monorepo/

    Package Sidebar

    Install

    npm i monorepo

    Weekly Downloads

    32

    Version

    1.2.2

    License

    MIT

    Unpacked Size

    18.9 kB

    Total Files

    25

    Last publish

    Collaborators

    • mariuslundgard