* chore: Upgrade pnpm to v10 * fix: Remove comments * fix: remove pnpm cache * fix: Manually retrieve cache directory * fix: unuse actions/cache@v4 * fix: test
3.3 KiB
How To Contribute
Opening Issues
-
Before opening an issue, please search for the keyword to see whether the issue you encountered has already been reported. 🙏
-
Issues should be opened via Issue Template, and the form should be filled with sufficient information to reproduce the issue, so that our developers can help you verify and fix it.
Issues with insufficient information WILL BE CLOSED directly because we cannot reproduce them.
- Issues with feature requests should be submitted to RFCs. This helps us manage feature requests more efficiently.
Next section is for those who wants to help develop Element Plus.
Prerequisites
You should have:
Node.js >= 20
pnpm >= 10.18
Git > 2.20
Some of our compiled code relies on features introduced in Node.js >= 20, so you will need to install that version or a newer one.
Clone the Repository
- Click the fork button on the top right of the repository homepage.
- Download the project to your machine.
- Run commands below to bootstrap this project.
cd $THE_PROJECT_PATH_YOU_DOWNLOADED
# If you haven't installed yet
pnpm install
Verify Installation
Then you can run the following commands to verify your installation.
pnpm t
pnpm format
Getting Started Developing
Now that you have installed the code correctly, you can choose:
Modify and update the documentation site
# If you would like to modify the website source code of https://element-plus.org
# It is made with [VitePress](https://vitepress.vuejs.org)
pnpm docs:gen-locale # This generates locale files for your local development
pnpm docs:dev
Making Changes to the Component Instead of the Website
# If you would like to run a local playground to test out your changes against
# Some specific component
pnpm dev
You can follow the LOCAL DEVELOPMENT GUIDE to do development more quickly.
Compile the Source Code
If you would like to compile this project locally:
# This one line code would start compiling the code which was published to https://npmjs.com
pnpm build
Compile Documentation Website
If you would like to compile the website code locally:
pnpm docs:build
Pull Requests
After completing your coding tasks, please note:
- Update the tests to cover all cases.
- Update the corresponding documentation if you are making changes to the API.
- Write a comprehensive commit message.
- Push your local changes to your remote, and then submit a pull request to the upstream.
- In the description section, you can add more information about your changes, to help the reviewers for better understanding the context here.
Commit Template
We have prepared a commit message template for you to refer to, you can also follow the instructions of the CLI tool to generate commit message intuitively.
- With command
pnpm cz
- You can also write the commit message manually, but make sure your commit message follows the rules.
We have a commit template
NOTE: PRs with unformatted commit messages WILL NOT BE ACCEPTED.
That's all, thanks for your contribution! 🤩