naive-ui/CONTRIBUTING.md

81 lines
1.9 KiB
Markdown
Raw Permalink Normal View History

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
## 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
pnpm run dev
# testing
pnpm run test
# testing some component
pnpm run test -- src/xxx
# testing with coverage
pnpm run test:cov
# lint code
pnpm run lint:code
# check type
pnpm run lint:type
# lint code & type
pnpm run lint
2021-06-23 00:08:49 +08:00
# build site (if vercel preview failed, you might need to run `git clean -fdx` first)
pnpm run build:site
```
## 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).
- Add space between Chinese and Latin charactors.
- Don't use Chinese punctuation in English docs.
- Don't write changelogs in a released version.
- When rebase the branch, pay attention to whether it is placed in the released version.
2024-01-08 21:09:26 +08:00
- Add NEXT_VERSION to the version of the API table.
For Example:
```
English API table:
| Name | Type | Default | Description | Version |
| --- | --- | --- | --- | --- |
2024-01-08 21:09:26 +08:00
| example | `any` | `undefined` | Need period. | NEXT_VERSION |
Chinese API table:
| 名称 | 类型 | 默认值 | 说明 | 版本 |
| --- | --- | --- | --- | --- |
2024-01-08 21:09:26 +08:00
| example | `any` | `undefined` | 描述不要加句号 | NEXT_VERSION |
English Changelog:
2021-06-23 00:08:49 +08:00
- Some changes, period needed.
Chinese Changelog:
- 一些变更,不要加句号
Space between Chinese and Latin charactors:
星之 star 卡比 kirby
Changelog position:
# CHANGELOG
2024-01-08 21:09:26 +08:00
## NEXT_VERSION
### Feats
your changelog
### Fixes
```