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 dev
and view your changes on your local document site. (If you add a new document page, you need to runyarn dev
again)
At any time, you think it's ok, you can start the following steps to submit your amazing works:
- Run
yarn lint
check the code style. - Run
yarn test:update
to 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.
- Create a folder in
components
, and addimport
tocomponents/index.ts
. - Create a document file in
pages/en-us/components/
. - Restart local server view changes:
yarn dev
.
- Document page must have
meta
field. refer to here. - If you are creating a new component, please provide at least one document.
- Do Document using mdx-js, here is vs-code plug-in.
- 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
testRegex
in.jest.config.js
allows you to test only a single component. - Please check coverage locally before submit.
How to choose the target branch of PR ?
- If this is a
feature
, set torc
branch. All the others are set tomaster
branch.
How to check my code style?
- Run
yarn prettier
I added a new document page, but it was not displayed locally ?
- Run
yarn dev
again.
How can I update remote origin ?
- refer to here.
- Create new issue to tell us: create issue.
- Ask on GitHub Discussions.