- Install a LTS Node.js version, such as v14.19.1
- Install rush globally:
npm install -g @microsoft/rush
- Clone the repository:
git clone [email protected]:tiktok/rush-plugins.git
We use Rush tool for building projects in this monorepo.
- Use rush to install the package dependencies:
cd rush-plugins
rush install
Note: you need to configure a Github email like [email protected]
- Build the project in the repo:
# rush build -t <package_name>
rush build -t rush-archive-project-plugin
This section shows the way to test the plugin in this repo.
Use rush-archive-project-plugin
for example:
- Modify common/autoinstallers/command-plugins/package.json
{
"name": "command-plugins",
"version": "1.0.0",
"private": true,
"dependencies": {
"rush-archive-project-plugin": "1.1.3",
- "rush-audit-cache-plugin": "0.0.2",
+ "rush-audit-cache-plugin": "link:../../../rush-plugins/rush-archive-project-plugin",
"rush-init-project-plugin": "0.6.0",
"rush-lint-staged-plugin": "0.1.6",
"rush-sort-package-json": "0.0.3",
"rush-upgrade-self-plugin": "1.0.6",
"typescript": "4.4.2"
}
}
- Update the plugins
rush update-autoinstaller --name command-plugins
rush update
- Test your plugin
Since rush-archive-project-plugin
provides rush archive-project
, you can test it now!
Note: You can see this approach uses a link:
protocol to install a rush plugin package by relative path. That means you can also configure another local monorepo to use this plugin as well.
We welcome contributions! To submit a feature:
- Fork the repo.
- Create a branch and commit your changes.
- If you modify any package.json files, run
rush update
to make sure thepnpm-lock.yaml
file is up to date. Commit any changes made to that file. - Before creating your PR, run
rush change
; If prompted, enter a change log message, commit the files that get created. - Create a pull request
- Add the project name as a prefix to your PR title. For example: "[rush-archive-project-plugin] Added a new API feature" or "[rush-init-project-plugin] Fixed a bug in the plugin".