Skip to content

Commit 85cccee

Browse files
authored
chore(project): add code of conduct and commit example (element-plus#5255)
1 parent e673657 commit 85cccee

4 files changed

Lines changed: 285 additions & 82 deletions

File tree

CONTRIBUTING.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# How To Contribute
2+
3+
## Opening issues
4+
5+
- Before opening issue please search for the keyword see whether the issue you encountered has been reported already. :pray:
6+
7+
- Issues should be opened via [Issue Template](https://elementui.github.io/issue-generator/#/en-US?repo=element-plus), fill in the form to provide
8+
sufficient information to reproduce the issue, so that our developers can help you verify and fix it
9+
10+
**Insufficient information issue WILL BE CLOSED directly because we cannot reproduce them**
11+
12+
- Issues that with feature request should to go to [RFCs](https://github.com/element-plus/rfcs/issues). This helps us managing the project.
13+
14+
Next section is for those who wants to help develop Element Plus.
15+
16+
## Pre-request
17+
18+
You should be having:
19+
20+
NodeJS >= 16
21+
22+
Git > v2.20
23+
24+
Some of our compiling code used syntax that introduced in NodeJS>16.0 so you will be need to install that in advance.
25+
26+
## Clone the repository
27+
28+
1. Click the fork button on the top right of this page.
29+
2. Download the project to your machine.
30+
3. Run commands below to bootstrap the this project.
31+
32+
```shell
33+
cd $THE_PROJECT_PATH_YOU_DOWNLOADED
34+
# If you haven't installed yet
35+
pnpm install
36+
```
37+
38+
## Verify Installation
39+
40+
Then you can following command to verify your installation.
41+
42+
```shell
43+
pnpm test
44+
pnpm run format
45+
```
46+
47+
## Getting Started developing
48+
49+
Ah, now you have installed the code correctly, you can choose:
50+
51+
### Modify and update the documentation site.
52+
53+
```shell
54+
# If you would like to modify the website source code of https://element-plus.org
55+
# It was made with [VitePress](https://vitepress.vuejs.org)
56+
pnpm run docs:gen-locale # This generates locale files for your local development
57+
pnpm run docs:dev
58+
```
59+
60+
### Making changes to the component instead of website
61+
62+
```shell
63+
# If you would like to run a local playground to test out your changes against
64+
# Some specific component
65+
touch play/scr/App.vue # Adding an entry for the play to run.
66+
pnpm run dev
67+
```
68+
69+
You can follow the [LOCAL DEVELOPMENT GUIDE](https://github.com/element-plus/element-plus/blob/dev/LOCAL_DEV.md) to do development more quickly.
70+
71+
### Compile the source code
72+
73+
If you would like to compile this project locally:
74+
75+
```shell
76+
# This one line code would start compiling the code which was published to https://npmjs.com
77+
pnpm build
78+
```
79+
80+
### Compile documentation website
81+
82+
If you would like to compile the website code locally:
83+
84+
```shell
85+
DOC_ENV=production yarn docs:build
86+
```
87+
88+
## Pulling request
89+
90+
After you done your coding section, please note:
91+
92+
1. Update the tests to cover all cases
93+
2. Update co-responding documentation if you are making changes against API
94+
3. Write a comprehensive commit message
95+
4. Push your local changes to your remote, and then pull request to the upstream.
96+
5. In the description section, you can add more information about your changes, to help the reviewers for better
97+
understanding the context here.
98+
99+
## Commit template
100+
101+
We prepared a commit message template for you to refer to, you can also follow the instruction of the CLI tool to generate
102+
commit message intuitively.
103+
104+
1. With command
105+
106+
```bash
107+
pnpm cz
108+
```
109+
110+
2. You can also write the commit message by hand, but make sure your
111+
commit message follows the rules.
112+
113+
We have a [commit template](https://github.com/element-plus/element-plus/blob/dev/commit-example.md)
114+
115+
NOTE:
116+
**PRs with unformatted commit message WILL NOT BE ACCEPTED**
117+
118+
That's all, thanks for your contribution! 🤩

LOCAL_DEV.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Local Development
2+
3+
## Generate new component
4+
5+
With command
6+
7+
```bash
8+
$ pnpm gen component-name
9+
```
10+
11+
Note the `component-name` must be in `kebab-case`, combining words by replacing each space with a dash.
12+
13+
And component type must be added to `typings/global.d.ts`.
14+
15+
## Bootstrap project
16+
17+
With command
18+
19+
```bash
20+
$ pnpm i
21+
```
22+
23+
the project will install all dependencies
24+
25+
## Website preview
26+
27+
With command
28+
29+
```bash
30+
$ pnpm docs:gen-locale
31+
$ pnpm docs:dev
32+
```
33+
34+
the project will launch website for you to preview all existing component
35+
36+
## Local development
37+
38+
See [Local development guide](https://github.com/element-plus/element-plus/CONTRIBUTING.md)
39+
40+
1. With command
41+
42+
```shell
43+
$ pnpm dev
44+
```
45+
46+
will start the local development environment
47+
48+
2. Add your component into `play/src/App.vue`
49+
50+
> App.vue
51+
52+
```vue
53+
<template>
54+
<ComponentYouAreDeveloping />
55+
</template>
56+
57+
<script setup lang="ts">
58+
// make sure this component is registered in @element-plus/components
59+
import { ComponentYouAreDeveloping } from '@element-plus/components'
60+
</script>
61+
```
62+
63+
Modify `App.vue` file per your needs to get things work.

README.md

Lines changed: 27 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,18 @@
2121

2222
This project is still under heavy development. Feel free to join us and make your first pull request.
2323

24+
## Getting Started
25+
26+
Alright, for you to get started if you are looking for making Element Plus better you should keep reading.
27+
For developers that uses Element Plus to develop your website you should go ahead visit [Getting Started](https://element-plus.org/)
28+
29+
- 中国大陆[加速镜像站点](https://element-plus.gitee.io/)
30+
2431
### Playground
2532

33+
You can also try Element Plus out with the components built-in playground
34+
(This thing is still under development, most of the functions are ready)
35+
2636
#### Try it with code sandbox
2737

2838
[![Edit element-plus](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/element-plus-demo-dxtcr)
@@ -64,99 +74,34 @@ This project is still under heavy development. Feel free to join us and make you
6474
Element Plus is translated to multiple languages, you can click the badge to help up update the translation or apply to become
6575
a proofreader [![Crowdin](https://badges.crowdin.net/element-plus/localized.svg)](https://crowdin.com/project/element-plus)
6676

67-
## Documentation
77+
For now we are only showing English and Chinese for resource reasons, but we are looking forward to translate it into more languages, please go to the link
78+
above and leave a message if you want to help translating Element Plus into your desired language.
6879

69-
You can find for more details, API, and other docs on [https://element-plus.org](https://element-plus.org/)
70-
71-
国内[加速镜像站点](https://element-plus.gitee.io/)
80+
## Stay tuned :eyes:
7281

7382
Join our [Discord](https://discord.link/ElementPlus) to start communicating with everybody.
7483

7584
## Breaking change list
7685

77-
You can find the breaking change list here: [Breaking Change List](https://github.com/element-plus/element-plus/issues/162).
78-
79-
## Bootstrap project
80-
81-
With command
82-
83-
```bash
84-
$ pnpm i
85-
```
86-
87-
the project will install all dependencies
88-
89-
## Website preview
90-
91-
With command
92-
93-
```bash
94-
$ pnpm docs:dev
95-
```
96-
97-
the project will launch website for you to preview all existing component
98-
99-
## Local development
86+
**Note:** we are now currently preparing for the stable release, the APIs should be stable right now, we are going to
87+
make a full list about how to get upgraded from [Element UI](https://element.eleme.io) to Element Plus. This breaking change list
88+
might be updated day by day.
10089

101-
1. With command
102-
103-
```shell
104-
$ pnpm dev
105-
```
106-
107-
will start the local development environment
108-
109-
2. Add your component into `play/src/App.vue`
110-
111-
> App.vue
112-
113-
```vue
114-
<template>
115-
<ComponentYouAreDeveloping />
116-
</template>
117-
118-
<script setup lang="ts">
119-
// make sure this component is registered in @element-plus/components
120-
import { ComponentYouAreDeveloping } from '@element-plus/components'
121-
</script>
122-
```
123-
124-
Modify `App.vue` file per your needs to get things work.
125-
126-
## Component migration process
127-
128-
1. Convert the item in https://github.com/element-plus/element-plus/projects/1 to an issue
129-
2. Assign yourself to the issue
130-
3. Author your component by generating new component command below
131-
4. Migrate tests and docs
132-
5. Open a new pull request, fill in the component issue link in 1
133-
134-
## Generate new component
135-
136-
With command
137-
138-
```bash
139-
$ pnpm gen component-name
140-
```
141-
142-
Note the `component-name` must be in `kebab-case`, combining words by replacing each space with a dash.
143-
144-
And component type must be added to `typings/global.d.ts`.
90+
You can find the breaking change list here: [Breaking Change List](https://github.com/element-plus/element-plus/issues/162).
14591

146-
## Commit template
92+
## This thing is broken, I should help improve it!
14793

148-
With command
94+
Awesommmmmmee. Everything you need is down below. You can also refer to
95+
[CONTRIBUTING](https://github.com/element-plus/element-plus/blob/dev/CONTRIBUTING.md) and
96+
[Code of Conduct](https://github.com/element-plus/element-plus/blob/dev/CODE_OF_CONDUCT.md)
97+
where you'll find the same information listed below.
14998

150-
```bash
151-
pnpm cz
152-
```
99+
## I would like to become a part of the development team!
153100

154-
Example
101+
Welcome :star_struck:! We are looking for talented developers to join us and making Element Plus better! If you care to join the development team, please
102+
reach out to us, you are more than welcomed to join us! :heart:
155103

156-
```
157-
# [TYPE](SCOPE): [el-component-name] DESCRIPTION#[ISSUE]
158-
# example: feat(components): [el-button] add type for form usage #1234
159-
```
104+
We are now lacking of experts of `Testing`, `GitHub Actions`, `PM`, if you do feel like you can and willing to help us, please do reach out to us. :pray:
160105

161106
## Sponsors
162107

@@ -177,7 +122,7 @@ And thank you to all our backers! 🙏
177122
<img src="https://contrib.rocks/image?repo=element-plus/element-plus" />
178123
</a>
179124

180-
## Licence
125+
## License
181126

182127
Element Plus is open source software licensed as
183128
[MIT](https://github.com/element-plus/element-plus/blob/master/LICENSE).

0 commit comments

Comments
 (0)