sunnysingh / rush-sandbox

A monorepo sandbox. Built with Rush.

Home Page:https://rushjs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rush Sandbox

This is an example monorepo setup with Rush.

Purpose

Rush is a great tool to manage monorepos, but it does not provide examples or tutorials for uncommon workflows.

The purpose of this rush-sandbox repository is to provide a place to test out monorepo workflows and setups.

Setup

If you have NVM:

  1. nvm use
  2. npm install --global @microsoft/rush
  3. rush update

If you want to get packages to publish via GitHub Actions, add an NPM_PUBLISH_TOKEN repository secret which refers to an NPM Access Token.

Note that pull requests use the test workflow and merges to main or next/** use the publish workflow.

Use Cases

Here are the use cases demonstrated by rush-sandbox.

Release Channels

Release channels allow you to publish a separate major version in parallel to your main branch.

In our case here, we utilize version policies and publish prerelease options.

To avoid disrupting existing contributor workflows, we do the following:

Note that next/** is a convention which makes sense for publishing to a future major version of your package under a different npm dist-tag. However, you can use a different convention for other use cases such as when you have to maintain older major versions. Also, if your packages form together into a framework, then you can use a single next branch. You will also likely want to use lockstep versioning.

About

A monorepo sandbox. Built with Rush.

https://rushjs.io


Languages

Language:JavaScript 61.4%Language:Shell 38.6%