Skip to content

Commit

Permalink
[new feature] Docs: contribute.md 移动至 .github 下 (youzan#212)
Browse files Browse the repository at this point in the history
* move contribute to .github

* fix wrong name

* move markdown.md to .github
  • Loading branch information
pangxie1991 authored Oct 16, 2017
1 parent 2f2eaaf commit b7dd98c
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 75 deletions.
60 changes: 29 additions & 31 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.

### 常用的npm scripts
- Rebase before creating a PR to keep commit history clear.

```shell
# watch和自动build,并启动一个静态服务器
$ npm run dev
- Add some descriptions and refer relative issues for you PR.

# 代码规范校验
$ npm run lint
## Getting started

# unit test watch
$ npm run test:watch
```bash
git clone [email protected]:youzan/vant.git

# test
$ npm run test
yarn

# 打包
$ npm run dist
npm run dev

# gh-pages分支deploy
$ npm run deploy
# open http://localhost:8080
```

### 项目目录结构

- build:打包配置
- docs:文档目录
- examples-dist:手机端md文件,自动生成,请勿改动
- examples-docs:PC端文档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.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ vant

## 组件文档如何编写

`docs/examples-docs` 下根据语言划分了组件文档,每个组件需要在各语言中编辑对应的文档。组件文档采用 markdown 格式,内容包括使用示例以及 `API` 等。具体书写规范请参考 [组件文档书写规范](./markdown.md)
`docs/examples-docs` 下根据语言划分了组件文档,每个组件需要在各语言中编辑对应的文档。组件文档采用 markdown 格式,内容包括使用示例以及 `API` 等。具体书写规范请参考 [组件文档书写规范](./MARKDOWN.md)

#### API 说明

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Vue.use(vant);

## How to contribute

Please make sure to read the [Contributing Guide](./docs/examples-docs/en-US/contribute.md) before making a pull request.
Please make sure to read the [Contributing Guide](./.github/CONTRIBUTING.md) before making a pull request.

## Preview

Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Vue.use(vant);

## 三、贡献代码

修改代码请阅读我们的 [开发指南](./docs/examples-docs/zh-CN/contribute.md)
修改代码请阅读我们的 [开发指南](./.github/CONTRIBUTING.zh-CN.md)

使用过程中发现任何问题都可以提 [Issue](https://github.com/youzan/vant/issues) 给我们,当然,我们也非常欢迎你给我们发 [PR](https://github.com/youzan/vant/pulls)

Expand Down
41 changes: 0 additions & 41 deletions docs/examples-docs/en-US/contribute.md

This file was deleted.

0 comments on commit b7dd98c

Please sign in to comment.