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

69 lines
2.7 KiB
Markdown
Raw Permalink 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 11:02:44 +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+` and `NPM 3+` are required.
```shell
git clone git@github.com:ElemeFE/element.git
npm run dev
# open http://localhost:8085
```
2017-02-04 16:42:28 +08:00
For Chinese users, [yarn](https://github.com/yarnpkg/yarn) with taobao registry is recommended if the dependency installation is slow.
```shell
npm i yarn -g
yarn config set registry https://registry.npm.taobao.org
yarn
npm run dev
# open http://localhost:8085
```
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, cooking config, documentation and `package.json` 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).