mirror of
https://github.com/zhigang1992/react.git
synced 2026-01-27 22:27:09 +08:00
* fix(image): image width & height types in docs. Fixed types of Image component's width & height in documentation. * fix: typo in contributing.md
3.0 KiB
3.0 KiB
Geist UI - React Contributing Guide
Ready to start
We welcome everyone to join in the construction of the project. As a pre requirement, you need to have a preliminary understanding of React, this is a good learning document for React. For basic operation of Git, you can refer to GitHub's help documentation.
- Fork this repository to your own account and then clone it.
- Create a new branch for your changes:
git checkout -b {BRANCH_NAME}. - Install Yarn and then update project dependenices:
yarn. - Run
yarn devand view your changes on your local document site. (If you add a new document page, you need to runyarn devagain)
At any time, you think it's ok, you can start the following steps to submit your amazing works:
- Run
yarn lintcheck the code style. - Run
yarn test-updateto update & run your testcase. - Run
git commit -ma '{YOUR_MESSAGE}'to commit changes. Commit info should be formatted by the rules. - Push code to your own repo and create PullRequest at GitHub.
Common steps
Create component
- Create a folder in
components, and addimporttocomponents/index.ts. - Create a document file in
pages/en-us/components/. - Restart local server view changes:
yarn dev.
About document page
- Document page must have
metafield. refer to here. - If you are creating a new component, please provide at least one document.
- Dodcument using mdx-js, here is vs-code plug-in, web-storm support
Create testcase
- If you are creating a new component, the testcase is required.
- If you only modify components, please note update test snapshot:
yarn test-update. - (Optional) Modifying
testRegexin.jest.config.jsallows you to test only a single component. - Please check coverage locally before submit.
Q & A
How to choose the target branch of PR ?
- If this is a
feature, set torcbranch. All the others are set tomasterbranch.
How to check my code style?
- Run
yarn prettier
I added a new document page, but it was not displayed locally ?
- Run
yarn devagian.
How can I update remote origin ?
- refer to here.
Get stuck
- Create new issue to tell us: create issue.
- Ask in chat room.