element/.github/CONTRIBUTING.en-US.md

61 lines
2.8 KiB
Markdown
Raw Normal View History

# Element UI Contributing Guide
2017-02-04 16:42:28 +08:00
Hi! Thank you for choosing Element UI.
2017-02-04 16:42:28 +08:00
Element UI is a Vue 2.0 based component library for developers, designers and product managers.
2017-02-04 16:42:28 +08:00
We are excited that you are interested in contributing to Element. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.
2017-02-04 16:42:28 +08:00
## Issue Guidelines
2017-11-16 10:59:22 +08:00
- Issues are exclusively for bug reports, feature requests and design-related topics. Other questions may be closed directly. If any questions come up when you are using Element, please hit [Gitter](https://gitter.im/element-en/Lobby) for help.
2017-02-04 16:42:28 +08:00
- Before submitting an issue, please check if similar problems have already been issued.
2017-02-04 16:42:28 +08:00
- Please specify which version of `Element` and `Vue` you are using, and provide OS and browser information. [JSFiddle](https://jsfiddle.net/) is recommended to build a live demo so that your issue can be reproduced clearly.
2017-02-04 16:42:28 +08:00
## Pull Request Guidelines
2017-02-04 16:42:28 +08:00
- Fork this repository to your own account. Do not create branches here.
2017-02-04 16:42:28 +08:00
- Commit info should be formatted as `[Component Name]: Info about commit.` (e.g. `Button: Fix xxx bug`)
2017-02-04 16:42:28 +08:00
- **DO NOT** include files inside `lib` directory.
2017-02-04 16:42:28 +08:00
- Make sure that running `npm run dist` outputs the correct files.
2017-02-04 16:42:28 +08:00
- For the sake of compatibility and file size, our babel configuration only imported `preset-2015`, so APIs like `Array.prototype.find` and `Object.assign` in `ES2015` are not recommended. You can import third party polyfills if necessary.
2017-02-04 16:42:28 +08:00
- Rebase before creating a PR to keep commit history clear.
2017-02-04 16:42:28 +08:00
- Make sure PRs are created to `dev` branch instead of `master` branch.
2017-02-04 16:42:28 +08:00
- If your PR fixes a bug, please provide a description about the related bug.
2017-02-04 16:42:28 +08:00
- Merging a PR takes two maintainers: one approves the changes after reviewing, and then the other reviews and merges.
## Prerequisites
`Node.js 4+`, `yarn` and `npm 3+` are required. Note: we use yarn to lock dependency versions, so you should install dependencies using `yarn` instead of `npm install`.
```shell
git clone git@github.com:ElemeFE/element.git
npm run dev
# open http://localhost:8085
```
> **Notice**: modify `examples/play/index.vue` file, use the component you contribute, then run `npm run dev:play`, go ahead [http://localhost:8085](http://localhost:8085), get result, more quickly and friendly.
To build:
```shell
npm run dist
```
2017-02-04 16:42:28 +08:00
## Component Developing Guidelines
- Run `make new <component-name>` to create project directory for a new component. Test codes, entry file and documentation are included.
2017-02-04 16:42:28 +08:00
- Refer to `Button` for nested components.
- Refer to `Select` for components that depend on other components.
2017-02-04 16:42:28 +08:00
## Code Style
Just comply with the [ESLint](https://github.com/ElemeFE/eslint-config-elemefe) configuration of [ElemeFE](https://github.com/elemefe).