2021-05-27 13:35:08 +08:00
|
|
|
# Contributing
|
|
|
|
|
2021-06-16 23:55:49 +08:00
|
|
|
- For new features & bug fixes, please create pull request to `main` branch.
|
|
|
|
- For documentation, please create pull request to `docs` branch.
|
2021-05-27 13:35:08 +08:00
|
|
|
|
2021-06-05 23:18:03 +08:00
|
|
|
## Useful Commands
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# open the dev server, please note that hot module reload doesn't work well
|
|
|
|
# if you find anything doesn't work, just refresh the page
|
2021-06-23 00:08:49 +08:00
|
|
|
# if you aren't able to open the page at the first time, try to refresh a couple of times
|
2022-07-21 23:06:59 +08:00
|
|
|
# pnpm version 7.0.0 and above is required
|
2021-10-27 02:23:24 +08:00
|
|
|
pnpm run dev
|
2021-06-05 23:18:03 +08:00
|
|
|
|
|
|
|
# testing
|
2021-10-27 02:23:24 +08:00
|
|
|
pnpm run test
|
2021-06-05 23:18:03 +08:00
|
|
|
|
|
|
|
# testing some component
|
2021-10-27 02:23:24 +08:00
|
|
|
pnpm run test -- src/xxx
|
2021-06-05 23:18:03 +08:00
|
|
|
|
|
|
|
# testing with coverage
|
2021-10-27 02:23:24 +08:00
|
|
|
pnpm run test:cov
|
2021-06-05 23:18:03 +08:00
|
|
|
|
|
|
|
# lint code
|
2021-10-27 02:23:24 +08:00
|
|
|
pnpm run lint:code
|
2021-06-05 23:18:03 +08:00
|
|
|
|
|
|
|
# check type
|
2021-10-27 02:23:24 +08:00
|
|
|
pnpm run lint:type
|
2021-06-05 23:18:03 +08:00
|
|
|
|
|
|
|
# lint code & type
|
2021-10-27 02:23:24 +08:00
|
|
|
pnpm run lint
|
2021-06-13 14:38:35 +08:00
|
|
|
|
2021-06-23 00:08:49 +08:00
|
|
|
# build site (if vercel preview failed, you might need to run `git clean -fdx` first)
|
2021-10-27 02:23:24 +08:00
|
|
|
pnpm run build:site
|
2021-06-13 14:38:35 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
## About Docs and Changelog Format
|
|
|
|
|
|
|
|
- Add period `.` to each description in English API tables (and each log of changelogs).
|
|
|
|
- Don't add period `。` in any description in Chinese API tables (and any log of changelogs).
|
2022-03-09 19:11:30 +08:00
|
|
|
- Add space between Chinese and Latin charactors.
|
2021-06-13 14:38:35 +08:00
|
|
|
- Don't use Chinese punctuation in English docs.
|
2021-07-26 23:30:58 +08:00
|
|
|
- Don't write changelogs in a released version.
|
|
|
|
- When rebase the branch, pay attention to whether it is placed in the released version.
|
2022-03-09 19:11:30 +08:00
|
|
|
- Add NEXT_VERSION to the version of the API table.
|
2021-06-13 14:38:35 +08:00
|
|
|
|
|
|
|
For Example:
|
|
|
|
|
|
|
|
```
|
|
|
|
English API table:
|
2022-03-09 19:11:30 +08:00
|
|
|
| Name | Type | Default | Description | Version |
|
|
|
|
| --- | --- | --- | --- | --- |
|
|
|
|
| example | `any` | `undefined` | Need period. | NEXT_VERSION |
|
2021-06-13 14:38:35 +08:00
|
|
|
|
|
|
|
Chinese API table:
|
2022-03-09 19:11:30 +08:00
|
|
|
| 名称 | 类型 | 默认值 | 说明 | 版本 |
|
|
|
|
| --- | --- | --- | --- | --- |
|
|
|
|
| example | `any` | `undefined` | 描述不要加句号 | NEXT_VERSION |
|
2021-06-13 14:38:35 +08:00
|
|
|
|
|
|
|
English Changelog:
|
2021-06-23 00:08:49 +08:00
|
|
|
- Some changes, period needed.
|
2021-06-13 14:38:35 +08:00
|
|
|
|
|
|
|
Chinese Changelog:
|
|
|
|
- 一些变更,不要加句号
|
|
|
|
|
2022-03-09 19:11:30 +08:00
|
|
|
Space between Chinese and Latin charactors:
|
2021-06-13 14:38:35 +08:00
|
|
|
星之 star 卡比 kirby
|
2021-07-26 23:30:58 +08:00
|
|
|
|
|
|
|
Changelog position:
|
|
|
|
|
|
|
|
# CHANGELOG
|
|
|
|
|
2022-03-09 19:11:30 +08:00
|
|
|
## NEXT_VERSION
|
2021-07-26 23:30:58 +08:00
|
|
|
|
|
|
|
### Feats
|
|
|
|
|
|
|
|
your changelog
|
|
|
|
|
|
|
|
### Fixes
|
2021-06-05 23:18:03 +08:00
|
|
|
```
|