Rush files and folders
Every Rush monorepo has a standard folder structure that is created by rush init
and validated by rush update
.
Configuration files
Folder path | What it does |
---|---|
rush.json | The main configuration file for Rush |
common/config/rush/.npmrc | If you need custom settings for "npm install" (e.g. NPM registry mappings), put them in this file. Rush will copy this file into the common/temp/ folder. |
common/config/rush/.npmrc-publish | Used instead of .npmrc for publishing operations. |
common/config/artifactory.json | Configuration for Rush integration with JFrog Artifactory services. |
common/config/build-cache.json | Configuration for Rush's Build cache |
common/config/rush/command-line.json | Used to define custom commands. |
common/config/rush/common-versions.json | Used to specify versions that affect all projects in a repo. |
common/config/rush/deploy.json | Used to define profiles for the rush deploy command |
common/config/rush/experiments.json | Enables experimental features of Rush |
common/config/rush/npm-shrinkwrap.json | The shrinkwrap file when your package manager is NPM. This is the common shrinkwrap file that applies to all projects in the Rush repo. For more information, see "What is this "shrinkwrap file" in the Everyday commands section. |
common/config/rush/rush-plugins.json | Specifies Rush plugins to be loaded for the monorepo. |
common/config/rush/pnpm-lock.yaml | The shrinkwrap file when your package manager is PNPM. |
common/config/rush/yarn.lock | The shrinkwrap file when your package manager is Yarn. |
common/config/rush/browser-approved-packages.json | Used by the approvedPackagesPolicy setting from rush.json |
common/config/rush/nonbrowser-approved-packages.json | Used by the approvedPackagesPolicy setting from rush.json |
common/config/rush/pnpm-config.json | Configuration specific to the PNPM package manager |
common/config/rush/version-policies.json | Defines the rush version and rush publish workflows. |
Standard Rush folders
Folder path | What it does |
---|---|
common/autoinstallers/... | Autoinstaller projects are created under this folder |
common/changes/... | Stores change files created by the rush change command and consumed by the rush version command. |
common/deploy/... | The rush init-deploy creates deployment configurations under this folder. |
common/git-hooks/... | Rush's git hook scripts are defined here |
common/pnpm-patches/... | The rush-pnpm commit-patch command stores package patch files under this folder |
common/scripts/install-run-rush.js | CI bootstrap script for invoking rush . The rush update generates this file, which should be committed to Git. See Enabling CI builds for details. |
common/scripts/install-run-rush-pnpm.js | CI bootstrap script for invoking rush-pnpm. |
common/scripts/install-run-rushx.js | CI bootstrap script for invoking rushx. |
common/scripts/install-run.js | CI bootstrap script for invoking arbitrary NPM packages. |
Temporary files created by Rush
Folder path | What it does |
---|---|
common/temp/build-cache/... | Default storage location for Rush's Build cache |
common/temp/install-run/... | Storage for the install-run.js and install-run-rush.js scripts. See Enabling CI builds. |
common/temp/node_modules/... | The installed packages. This is a plain old npm install output, with no symlinks in this tree. |
common/temp/npm-cache/... | A local NPM cache will be created here. Rush does not use the global NPM cache due to its concurrency problems. |
common/temp/npm-local/... | If the NPM package manager is selected, this is a symlink to Rush's global install of the version specified in rush.json. |
common/temp/npm-tmp/... | Temporary files created by NPM during installation. |
common/temp/patches/... | The rush-pnpm patch command creates patch files under this temporary folder (which rush-pnpm commit-patch will copy to common/pnpm-patches ) |
common/temp/pnpm-local/... | If the PNPM package manager is selected, this is a symlink to Rush's global install of the version specified in rush.json. |
common/temp/pnpm-store/... | If the PNPM package manager is selected, this is the default location of the PNPM store. (It can be redirected using the RUSH_PNPM_STORE_PATH environment variable.) |
common/temp/projects/... | Synthetic projects referenced by common/temp/package.json. |
common/temp/rush-recycler/... | Used to speed up recursive deletes. |
common/temp/telemetry/... | Stores telemetry output saved by Rush when telemetryEnabled=true in rush.json |
common/temp/yarn-local/... | If the Yarn package manager is selected, this is a symlink to Rush's global install of the version specified in rush.json. |
common/temp/last-install.flag | Don't worry about this file. It tracks the timestamp of the last successful rush install . |
common/temp/package.json | The common package definition. |
common/temp/repo-state.json | Generated by the preventManualShrinkwrapChanges setting from pnpm-config.json |
common/temp/rush-link.json | Don't worry about this file. It is created whenever you run rush link , and read by later commands such as "rush build". |