[new feature] Docs: contribute.md 移动至 .github 下 (#212)

* move contribute to .github

* fix wrong name

* move markdown.md to .github
This commit is contained in:
Yao
2017-10-16 20:23:48 +08:00
committed by GitHub
parent 2f2eaaff50
commit b7dd98c428
6 changed files with 39 additions and 82 deletions

View File

@@ -1,43 +1,41 @@
# Vant Contributing Guide
# Contributing to Vant
## 开发环境
The following is a set of guidelines for contributing to Vant. Please spend several minutes in reading these guidelines before you create an issue or pull request.
当你克隆好仓库后,运行:
Anyway, these are just guidelines, not rules, use your best judgment and feel free to propose changes to this document in a pull request.
```shell
yarn || npm i
## Opening an Issue
If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been reported or fixed. You can search through existing issues and PRs to see if someone has reported one similar to yours.
Next, create a new issue that briefly explains the problem, and provides a bit of background as to the circumstances that triggered it, and steps to reproduce it.
## Submitting a Pull Request
It's welcomed to pull request, And there are some tips about that:
- Before working on a large change, it is best to open an issue first to discuss it with the maintainers.
- When in doubt, keep your pull requests small. To give a PR the best chance of getting accepted, don't bundle more than one feature or bug fix per pull request. It's always best to create two smaller PRs than one big one.
- When adding new features or modifying existing, please attempt to include tests to confirm the new behaviour.
- Rebase before creating a PR to keep commit history clear.
- Add some descriptions and refer relative issues for you PR.
## Getting started
```bash
git clone git@github.com:youzan/vant.git
yarn
npm run dev
# open http://localhost:8080
```
### 常用的npm scripts
```shell
# watch和自动build并启动一个静态服务器
$ npm run dev
# 代码规范校验
$ npm run lint
# unit test watch
$ npm run test:watch
# test
$ npm run test
# 打包
$ npm run dist
# gh-pages分支deploy
$ npm run deploy
```
### 项目目录结构
- build打包配置
- docs文档目录
- examples-dist手机端md文件自动生成请勿改动
- examples-docsPC端文档md文件
- src文档页项目代码
- lib打包后生成的文件
- packages组件目录每个组件是一个目录
- src主文件以及一些公用的`mixins``utils`
- test测试用例
## Component Developing Guidelines
- Create new directory under `packages` for a new component.
- All the style code are located under `packages/vant-css/src`.
- Refer to `Sku` for nested components.
- Refer to `Button` for components that depend on other components.