Skip to main content

Contribution Documentation

AidenLess than 1 minute

Contribution Documentation

Local Development

Installing Rush

Info

If you already have the Rush command installed locally, you may skip this step and check with rush -h.

pnpm add @microsoft/rush --global

Restoring Dependencies

Use rush update command to restore dependencies.

Running Project Commands Locally

Execute rushx [script_name] at the project path. This command can run the scripts command inside the project.

Managing Dependencies

https://rushjs.io/zh-cn/pages/commands/rush_add/open in new window

rush add -p [package_name] adds dependencies at the corresponding project path. --dev adds development dependencies, and -m keeps the same version for all projects in the repository.

rush remove -p [package_name] removes dependencies at the corresponding project path.

Rush Documentation

Monorepo usageopen in new window

Project Structure

.
├── common
│   ├── autoinstallers # Dependency or command scripts irrelevant to business.
│   ├── config         # Configuration
│   ├── git-hooks
│   └── scripts        # Rush scripts
├── apps               # Project folders
├── libraries          # Infrastructure package folders
│   ├── commander      # Scaffold
│   ├── documents      # Document project
│   ├── eslint-config  # Eslint recommended configuration package
│   ├── styles         # Common style library
│   └── utils          # Utility function library
└── rush.json          # Rush configuration file