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 🙏

© 2024 – Pkg Stats / Ryan Hefner

mr-yarn

v1.0.0-alpha.11

Published

Yarn Workspaces mono repo utility

Downloads

3

Readme

Mr Yarn

It knits your workspaces together!

CircleCI

Mr Yarn is a mono repository utility tool specifically for mono repositories powered by Yarn Workspaces.

It isn't designed to do anything Yarn can't do. It simply optimizes your mono repo workflow by allowing you to perform common actions like installing dependencies and running scripts across multiple workspaces (packages) in a single command.

Installation

# Install globally
yarn global add mr-yarn

# Verify installation
mr --version

Commands

add

Add dependencies to workspaces. Mr Yarn will automatically detect any dependencies that are local workspaces and add those too!

# Dependencies
mr add react react-dom

# Dev dependencies
mr add --dev webpack
mr add -D webpack

# Filter workspaces
mr add --workspaces workspace-one yargs
mr add -w workspace-one yargs

remove

Remove dependencies from workspaces.

# Dependencies
mr remove react react-dom

# Filter workspaces
mr remove --workspaces workspace-one yargs
mr remove -w workspace-one yargs

run

Run NPM scripts in workspaces.

Currently all scripts are run in parallel all the time.

# No args
mr run start

# With args 'webpack-dev-server --hot'
mr run start -- --hot

# Wildcard support, run test:unit and test:e2e for example
mr run test:*

# Filter workspaces
mr run --workspaces workspace-one start
mr run -w workspace-one start

Filtering workspaces

You can use a comma seperated list with the workspaces flag.

# A single filtered workspace
mr add --workspaces workspace-one yargs
mr add --w workspace-one yargs

# Multiple filtered workspaces
mr add --workspaces workspace-one,workspace-two yargs
mr add --w workspace-one,workspace-two yargs

# Filter including wildcard
mr add --workspaces workspace-* yargs
mr run --workspaces app-*,server-* start

CLI

Other useful options:

# Display help including commands and their options
mr --help

# Display Mr Yarn's version
mr --version

FAQ 🤔

Is Mr Yarn a replacement for Lerna?

Sort of... Lerna's scope is greater than that of Mr Yarn. This tool is more interested in making developers lives in mono repos easier. It isn't interested (right now 😛) in publishing et al.