Top Related Projects
Set up a modern web app by running one command.
A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
:dragon: Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository.
Smart Monorepos · Fast CI
Build system optimized for JavaScript and TypeScript, written in Rust
Fast, disk space efficient package manager
Quick Overview
Rush Stack is a monorepo management system and set of tools designed to help developers build and maintain large-scale TypeScript projects. It provides a scalable solution for managing multiple packages within a single repository, offering features like incremental builds, dependency management, and standardized tooling across projects.
Pros
- Efficient monorepo management with optimized build processes
- Standardized tooling and configurations across projects
- Supports incremental builds, reducing overall build times
- Integrates well with popular JavaScript/TypeScript ecosystems
Cons
- Steep learning curve for developers new to monorepo concepts
- May be overkill for smaller projects or teams
- Requires initial setup and configuration effort
- Limited flexibility in some areas due to opinionated approach
Code Examples
- Installing Rush globally:
npm install -g @microsoft/rush
- Creating a new Rush project:
rush init
- Building all projects in the monorepo:
rush build
- Adding a new package to the monorepo:
rush add --package example-package --exact
Getting Started
To get started with Rush Stack:
-
Install Rush globally:
npm install -g @microsoft/rush
-
Create a new directory for your monorepo and navigate to it:
mkdir my-monorepo && cd my-monorepo
-
Initialize a new Rush project:
rush init
-
Edit the
rush.json
file to configure your project structure and dependencies. -
Add your first package:
mkdir packages/my-package cd packages/my-package npm init -y
-
Update the
rush.json
file to include your new package. -
Run
rush update
to install dependencies and link packages:rush update
Now you're ready to start developing your monorepo with Rush Stack!
Competitor Comparisons
Set up a modern web app by running one command.
Pros of Create React App
- Simpler setup and configuration for beginners
- Faster initial project creation and development start
- Widely adopted in the React community with extensive resources
Cons of Create React App
- Less flexibility for advanced configurations
- Limited to React-based projects only
- Potential for "ejecting" to gain more control, which can be complex
Code Comparison
Create React App:
npx create-react-app my-app
cd my-app
npm start
RushStack:
npm install -g @microsoft/rush
rush init
rush update
rush build
Key Differences
- RushStack is a more comprehensive monorepo management tool, while Create React App focuses on single React application setup
- RushStack supports multiple project types and frameworks, whereas Create React App is React-specific
- RushStack offers more advanced build and dependency management features, but with a steeper learning curve
Use Cases
- Choose Create React App for quick React project setup or learning React
- Opt for RushStack when managing complex, multi-project repositories or requiring advanced build customization
A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
Pros of webpack
- More mature and widely adopted in the JavaScript ecosystem
- Extensive plugin system with a large community-contributed ecosystem
- Supports a broader range of asset types and module formats
Cons of webpack
- Can be complex to configure, especially for large projects
- Build times can be slower for large applications
- Steeper learning curve for beginners
Code Comparison
webpack configuration example:
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
},
};
RushStack (using heft) configuration example:
{
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json",
"extends": ["@rushstack/heft-node-rig"],
"eventActions": [
{
"actionKind": "runNodeService",
"serviceName": "my-service"
}
]
}
Both webpack and RushStack offer powerful build and bundling capabilities, but they cater to different needs. webpack is more focused on asset bundling and module management, while RushStack provides a comprehensive monorepo management solution with build tools. The choice between them depends on project requirements, team expertise, and scalability needs.
:dragon: Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository.
Pros of Lerna
- Simpler setup and configuration process
- Wider adoption and community support
- More flexible for diverse project structures
Cons of Lerna
- Less optimized for large-scale monorepos
- Limited built-in task running and dependency management
- Slower package installation and linking in complex projects
Code Comparison
Lerna configuration:
{
"version": "independent",
"npmClient": "yarn",
"packages": ["packages/*"],
"command": {
"publish": {
"ignoreChanges": ["*.md"]
}
}
}
Rush configuration:
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
"rushVersion": "5.45.6",
"projects": [
{
"packageName": "my-app",
"projectFolder": "packages/my-app"
}
]
}
Both tools aim to manage monorepos, but Rush offers more advanced features for large-scale projects, while Lerna provides a simpler approach suitable for smaller to medium-sized monorepos. Rush excels in build optimization and strict dependency management, whereas Lerna offers more flexibility and easier adoption for teams transitioning to monorepos.
Smart Monorepos · Fast CI
Pros of Nx
- More extensive plugin ecosystem, offering integrations with various frameworks and tools
- Powerful code generation capabilities for scaffolding projects and components
- Advanced dependency graph visualization and analysis tools
Cons of Nx
- Steeper learning curve, especially for developers new to monorepo concepts
- Can be overkill for smaller projects or teams
- Some features require paid plans for larger organizations
Code Comparison
Nx project configuration:
{
"name": "my-nx-workspace",
"projects": {
"app1": { "root": "apps/app1" },
"lib1": { "root": "libs/lib1" }
}
}
Rush configuration:
{
"projects": [
{ "packageName": "app1", "projectFolder": "apps/app1" },
{ "packageName": "lib1", "projectFolder": "libs/lib1" }
]
}
Both Nx and Rush Stack are powerful monorepo management tools, but they have different approaches. Nx focuses on a more integrated development experience with its plugin system and code generation features, while Rush Stack provides a more lightweight and flexible solution that integrates well with existing tools and workflows. The choice between them often depends on project size, team preferences, and specific requirements.
Build system optimized for JavaScript and TypeScript, written in Rust
Pros of Turborepo
- Simpler setup and configuration process
- Faster execution times for large monorepos
- Better support for incremental builds and caching
Cons of Turborepo
- Less mature ecosystem and community support
- Fewer built-in features for managing complex monorepos
- Limited customization options compared to Rush
Code Comparison
Turborepo configuration (turbo.json):
{
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**"]
}
}
}
Rush configuration (rush.json):
{
"projects": [
{
"packageName": "my-app",
"projectFolder": "apps/my-app"
}
]
}
Both Rushstack and Turborepo are powerful tools for managing monorepos, but they have different strengths and weaknesses. Turborepo offers a more streamlined experience with faster execution times, while Rushstack provides a more comprehensive set of features for complex project management. The choice between the two depends on the specific needs of your project and team.
Fast, disk space efficient package manager
Pros of pnpm
- Faster installation and smaller disk space usage due to its unique package management approach
- Built-in monorepo support without additional tooling
- Simpler configuration and easier learning curve for developers
Cons of pnpm
- Less integrated tooling for large-scale monorepo management
- Fewer built-in features for CI/CD pipeline optimization
- Limited customization options for complex build scenarios
Code Comparison
pnpm:
{
"scripts": {
"start": "pnpm run --parallel start",
"build": "pnpm run --recursive build"
}
}
RushStack:
{
"rushVersion": "5.XX.X",
"projects": [
{
"packageName": "my-app",
"projectFolder": "apps/my-app"
}
]
}
pnpm focuses on efficient package management and simple monorepo setups, while RushStack provides a more comprehensive suite of tools for large-scale JavaScript projects. pnpm offers faster installations and a straightforward approach, making it ideal for smaller to medium-sized projects. RushStack, on the other hand, excels in managing complex monorepos with advanced build pipelines and extensive customization options, but comes with a steeper learning curve and more configuration overhead.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
The home for projects maintained by the Rush Stack community. Our mission is to develop reusable tooling for large scale TypeScript monorepos.
Open in VS Code web view |
Documentation Links
- What is Rush Stack? - learn about the mission behind these projects
- API reference - browse API documentation for NPM packages
- Zulip chat room - chat with the Rush Stack developers
- Rush - a build orchestrator for large scale TypeScript monorepos
- Heft - our recommended tool that integrates with Rush
- API Extractor - create .d.ts rollups and track your TypeScript API signatures
- API Documenter - use TSDoc comments to publish an API documentation website
- Lockfile Explorer - investigate and solve version conflicts for PNPM lockfiles
- TSDoc - the standard for doc comments in TypeScript code
Related Repos
These GitHub repositories provide supplementary resources for Rush Stack:
- rushstack-samples - a monoprepo with sample projects that illustrate various project setups, including how to use Heft with other popular JavaScript frameworks
- rush-example - a minimal Rush repo that demonstrates the fundamentals of Rush without relying on any other Rush Stack tooling
- rushstack-websites - Docusaurus monorepo for our websites
Published Packages
Unpublished Local Projects
Folder | Description |
---|---|
/apps/lockfile-explorer-web | Rush Lockfile Explorer: helper project for building the React web application component |
/build-tests-samples/heft-node-basic-tutorial | (Copy of sample project) Building this project is a regression test for Heft |
/build-tests-samples/heft-node-jest-tutorial | (Copy of sample project) Building this project is a regression test for Heft |
/build-tests-samples/heft-node-rig-tutorial | (Copy of sample project) Building this project is a regression test for Heft |
/build-tests-samples/heft-serverless-stack-tutorial | (Copy of sample project) Building this project is a regression test for Heft |
/build-tests-samples/heft-storybook-react-tutorial | (Copy of sample project) Building this project is a regression test for Heft |
/build-tests-samples/heft-storybook-react-tutorial-app | Building this project is a regression test for heft-storybook-plugin |
/build-tests-samples/heft-storybook-react-tutorial-storykit | Storybook build dependencies for heft-storybook-react-tutorial |
/build-tests-samples/heft-web-rig-app-tutorial | (Copy of sample project) Building this project is a regression test for Heft |
/build-tests-samples/heft-web-rig-library-tutorial | (Copy of sample project) Building this project is a regression test for Heft |
/build-tests-samples/heft-webpack-basic-tutorial | (Copy of sample project) Building this project is a regression test for Heft |
/build-tests-samples/packlets-tutorial | (Copy of sample project) Building this project is a regression test for @rushstack/eslint-plugin-packlets |
/build-tests-subspace/rush-lib-test | A minimal example project that imports APIs from @rushstack/rush-lib |
/build-tests-subspace/rush-sdk-test | A minimal example project that imports APIs from @rushstack/rush-sdk |
/build-tests-subspace/typescript-newest-test | Building this project tests Heft with the newest supported TypeScript compiler version |
/build-tests-subspace/typescript-v4-test | Building this project tests Heft with TypeScript v4 |
/build-tests/api-documenter-scenarios | Building this project is a regression test for api-documenter |
/build-tests/api-documenter-test | Building this project is a regression test for api-documenter |
/build-tests/api-extractor-d-cts-test | Building this project is a regression test for api-extractor |
/build-tests/api-extractor-d-mts-test | Building this project is a regression test for api-extractor |
/build-tests/api-extractor-lib1-test | Building this project is a regression test for api-extractor |
/build-tests/api-extractor-lib2-test | Building this project is a regression test for api-extractor |
/build-tests/api-extractor-lib3-test | Building this project is a regression test for api-extractor |
/build-tests/api-extractor-lib4-test | Building this project is a regression test for api-extractor |
/build-tests/api-extractor-lib5-test | Building this project is a regression test for api-extractor |
/build-tests/api-extractor-scenarios | Building this project is a regression test for api-extractor |
/build-tests/api-extractor-test-01 | Building this project is a regression test for api-extractor |
/build-tests/api-extractor-test-02 | Building this project is a regression test for api-extractor |
/build-tests/api-extractor-test-03 | Building this project is a regression test for api-extractor |
/build-tests/api-extractor-test-04 | Building this project is a regression test for api-extractor |
/build-tests/eslint-7-11-test | This project contains a build test to validate ESLint 7.11.0 compatibility with the latest version of @rushstack/eslint-config (and by extension, the ESLint plugin) |
/build-tests/eslint-7-7-test | This project contains a build test to validate ESLint 7.7.0 compatibility with the latest version of @rushstack/eslint-config (and by extension, the ESLint plugin) |
/build-tests/eslint-7-test | This project contains a build test to validate ESLint 7 compatibility with the latest version of @rushstack/eslint-config (and by extension, the ESLint plugin) |
/build-tests/eslint-8-test | This project contains a build test to validate ESLint 8 compatibility with the latest version of @rushstack/eslint-config (and by extension, the ESLint plugin) |
/build-tests/eslint-bulk-suppressions-test | Sample code to test eslint bulk suppressions |
/build-tests/eslint-bulk-suppressions-test-legacy | Sample code to test eslint bulk suppressions for versions of eslint < 8.57.0 |
/build-tests/hashed-folder-copy-plugin-webpack5-test | Building this project exercises @rushstack/hashed-folder-copy-plugin with Webpack 5. NOTE - THIS TEST IS CURRENTLY EXPECTED TO BE BROKEN |
/build-tests/heft-copy-files-test | Building this project tests copying files with Heft |
/build-tests/heft-example-plugin-01 | This is an example heft plugin that exposes hooks for other plugins |
/build-tests/heft-example-plugin-02 | This is an example heft plugin that taps the hooks exposed from heft-example-plugin-01 |
/build-tests/heft-fastify-test | This project tests Heft support for the Fastify framework for Node.js services |
/build-tests/heft-jest-preset-test | This project illustrates configuring a Jest preset in a minimal Heft project |
/build-tests/heft-jest-reporters-test | This project illustrates configuring Jest reporters in a minimal Heft project |
/build-tests/heft-minimal-rig-test | This is a minimal rig package that is imported by the 'heft-minimal-rig-usage-test' project |
/build-tests/heft-minimal-rig-usage-test | A test project for Heft that resolves its compiler from the 'heft-minimal-rig-test' package |
/build-tests/heft-node-everything-esm-module-test | Building this project tests every task and config file for Heft when targeting the Node.js runtime when configured to use ESM module support |
/build-tests/heft-node-everything-test | Building this project tests every task and config file for Heft when targeting the Node.js runtime |
/build-tests/heft-parameter-plugin | This project contains a Heft plugin that adds a custom parameter to built-in actions |
/build-tests/heft-parameter-plugin-test | This project exercises a built-in Heft action with a custom parameter |
/build-tests/heft-sass-test | This project illustrates a minimal tutorial Heft project targeting the web browser runtime |
/build-tests/heft-typescript-composite-test | Building this project tests behavior of Heft when the tsconfig.json file uses project references. |
/build-tests/heft-typescript-v2-test | Building this project tests building with TypeScript v2 |
/build-tests/heft-typescript-v3-test | Building this project tests building with TypeScript v3 |
/build-tests/heft-typescript-v4-test | Building this project tests building with TypeScript v4 |
/build-tests/heft-web-rig-library-test | A test project for Heft that exercises the '@rushstack/heft-web-rig' package |
/build-tests/heft-webpack4-everything-test | Building this project tests every task and config file for Heft when targeting the web browser runtime using Webpack 4 |
/build-tests/heft-webpack5-everything-test | Building this project tests every task and config file for Heft when targeting the web browser runtime using Webpack 5 |
/build-tests/localization-plugin-test-01 | Building this project exercises @microsoft/localization-plugin. This tests that the plugin works correctly without any localized resources. |
/build-tests/localization-plugin-test-02 | Building this project exercises @microsoft/localization-plugin. This tests that the loader works correctly with the exportAsDefault option unset. |
/build-tests/localization-plugin-test-03 | Building this project exercises @microsoft/localization-plugin. This tests that the plugin works correctly with the exportAsDefault option set to true. |
/build-tests/package-extractor-test-01 | This project is used by tests in the @rushstack/package-extractor package. |
/build-tests/package-extractor-test-02 | This project is used by tests in the @rushstack/package-extractor package. |
/build-tests/package-extractor-test-03 | This project is used by tests in the @rushstack/package-extractor package. |
/build-tests/package-extractor-test-04 | This project is used by tests in the @rushstack/package-extractor package. |
/build-tests/rush-amazon-s3-build-cache-plugin-integration-test | Tests connecting to an amazon S3 endpoint |
/build-tests/rush-lib-declaration-paths-test | This project ensures all of the paths in rush-lib/lib/... have imports that resolve correctly. If this project builds, all lib/**/*.d.ts files in the @microsoft/rush-lib package are valid. |
/build-tests/rush-project-change-analyzer-test | This is an example project that uses rush-lib's ProjectChangeAnalyzer to |
/build-tests/rush-redis-cobuild-plugin-integration-test | Tests connecting to an redis server |
/build-tests/set-webpack-public-path-plugin-test | Building this project tests the set-webpack-public-path-plugin |
/build-tests/ts-command-line-test | Building this project is a regression test for ts-command-line |
/eslint/local-eslint-config | An ESLint configuration consumed projects inside the rushstack repo. |
/libraries/rush-themed-ui | Rush Component Library: a set of themed components for rush projects |
/libraries/rushell | Execute shell commands using a consistent syntax on every platform |
/repo-scripts/doc-plugin-rush-stack | API Documenter plugin used with the rushstack.io website |
/repo-scripts/generate-api-docs | Used to generate API docs for the rushstack.io website |
/repo-scripts/repo-toolbox | Used to execute various operations specific to this repo |
/rigs/local-node-rig | A rig package for Node.js projects that build using Heft inside the RushStack repository. |
/rigs/local-web-rig | A rig package for Web projects that build using Heft inside the RushStack repository. |
/rush-plugins/rush-litewatch-plugin | An experimental alternative approach for multi-project watch mode |
/vscode-extensions/rush-vscode-command-webview | Part of the Rush Stack VSCode extension, provides a UI for invoking Rush commands |
/vscode-extensions/rush-vscode-extension | Enhanced experience for monorepos that use the Rush Stack toolchain |
/webpack/webpack-deep-imports-plugin | This plugin creates a bundle and commonJS files in a 'lib' folder mirroring modules in another 'lib' folder. |
Contributor Notice
This repo welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This repo has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Top Related Projects
Set up a modern web app by running one command.
A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
:dragon: Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository.
Smart Monorepos · Fast CI
Build system optimized for JavaScript and TypeScript, written in Rust
Fast, disk space efficient package manager
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot