Thanks for that you are interested in contributing to Rspress. Before starting your contribution, please take a moment to read the following guidelines.
Fork this repository to your own GitHub account and then clone it to your local.
We recommend using Rustup to manage the rust version. You can setup your Rustup and Cargo development environment with Getting-started.
We recommend using Node.js 18. You can check your currently used Node.js version with the following command:
node -v
If you do not have Node.js installed in your current environment, you can use nvm or fnm to install it.
Here is an example of how to install the Node.js 18 LTS version via nvm:
# Install the LTS version of Node.js 18
nvm install 18 --lts
# Make the newly installed Node.js 18 as the default version
nvm alias default 18
# Switch to the newly installed Node.js 18
nvm use 18
# Enable pnpm with corepack, only available on Node.js >= `v14.19.0`
corepack enable
pnpm install
Please make sure you have your email set up in <https://github.com/settings/emails>
. This will be needed later when you want to submit a pull request.
Check that your git client is already configured the email:
git config --list | grep email
Set the email to global config:
git config --global user.email "[email protected]"
Set the email for local repo:
git config user.email "[email protected]"
Once you have set up the local development environment in your forked repo, we can start development.
It is recommended to develop on a new branch, as it will make things easier later when you submit a pull request:
git checkout -b MY_BRANCH_NAME
Commit your changes to your forked repo, and create a pull request.
The format of PR titles follow Conventional Commits.
An example:
feat(plugin-swc): Add `myOption` config
^ ^ ^
| | |__ Subject
| |_______ Scope
|____________ Type
Repository maintainers can publish a new version of all packages to npm.
Here are the steps to publish (we generally use CI for releases and avoid publishing npm packages locally):
-
Modify version field in package.json to bump major/minor/patch version number
-
Execute
pnpm run release-commit
to create achore(release)
commit and open a pull request -
Review and merge the release pull request