npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mrbt

v0.0.2

Published

Build tools for monorepos

Downloads

688

Readme

Introduction

This package is a set of tools that simplifies building of JavaScript monorepositories that are orginized by tools like Lerna and Yarn Workspaces. mrbt has two parts:

  1. Monorepo build.
  2. Utils.

Monorepo build

JavaScript monorepositories usually contain several JavaScript packages that are placed in package folder and that depends on each other. So when we want to build such monorepo, we need to build every its package in order that takes in accout dependencies between packages. Monorepo build is a set of classes that:

  1. Allows to describe how to build every package in monorepo
  2. Executs building commands of packages in correct order

Description of build process answers the following questions:

  1. Where are packages? By default packages are placed in packages folder, but it can be any other.
  2. What is default build command(s)? Quite often build procedure are the same for most packages in a monorepo, for example, it can include one or several commands that are the same for most repos like:
    yarn clean && yarn gulp && npm publish
    So to avoid repeating the same set of commands for every package, you define default command(s) that will be executed for every package without redefined command (see next item).
  3. How to redefine the default build command? For some packages build procedure can be different, so we need to specify that we don't want to use default command to build this particular package(s) and define what command(s) should be used instead.

Monorepo build has two types of API: Fluent API that allows to describe build process by using builders, and Description API that allows to describe build process by using description JavaScript object. The APIs functionally identical. You can find more about APIs in API documentation.

Utils

Utils contains helpers that are not part of Monorepo build and that can be used in any node application outside of Monorepo build process.

Please find API documentation on GitPages

Passing command line arguments

Usually command line arguments are described for each executor separately. But also you can pass arguments that will be passed in every executor of given type. For that you just need to add command line argument for build script, and this argument shoud have the following format:

mrbt-[executor command]=[argument value]

MRBT will remove prefix and pass argument value part as argument in every executor with command === executor command part. For example, you have several executors that run mvn command and you want to pass -s /path/settings.xml in every mvn command to enforce using custom settings. For that you can write:

node build.js mrbt-mvn=-s mrbt-mvn=/path/settings.xml

and MRBT will pass -s and /path/settings.xml arguments in every executor that runs mvn command; it will be done in addition to arguments that are described in executors configuration. Also you can inject arguments with some prefix in partical executors. For example, you build package package-a by using gulp and you want to provide list of gulp tasks by using command line arguments. To implement that you need to define you executor in the following way:

{
    package: 'package-a',
    executor: {
        type: 'gulp',
        args: [...mrbt.utils.args('package-a')]
    }
}

and then in command line pass all required tasks like this:

node build.js package-a=clean package-a=build package-a=deploy