Skip to content

Commit

Permalink
docs: contributing && readme && deps (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
atian25 authored and popomore committed Jan 13, 2017
1 parent c05d2b2 commit ecbed08
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 68 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
sudo: false
language: node_js
node_js:
- '4'
- '6'
- '7'
install:
Expand Down
36 changes: 18 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ or make any change as you wish and submit an [PR](https://github.com/eggjs/egg/i

- Please specify what kind of issue it is.
- Before you report an issue, please search for related issues. Make sure you are not going to open a duplicate issue.
- Explain your purpose clearly in tags(see __Useful Tags__), title, or content.
- Explain your purpose clearly in tags(see __Useful Tags__), title, or content.

Egg group members will confirm the purpose of the issue, replace more accurate tags for it, identify related milestone, and assign developers working on it.
Egg group members will confirm the purpose of the issue, replace more accurate tags for it, identify related milestone, and assign developers working on it.
Tags can be divided into two groups, `type` and `scope`.

- type: What kind of issue, e.g. `feature`, `bug`, `documentation`, `performance`, `support` ...
- scope: What did you modified. Which files are modified, e.g. `core: xx`, `plugin: xx`, `deps: xx`
- scope: What did you modified. Which files are modified, e.g. `core: xx`, `plugin: xx`, `deps: xx`

### Useful Tags

- `support`: the issue asks helps from developers of our group. If you need helps to locate and handle problems or have any idea to improve Egg, mark it as `support`.
- `support`: the issue asks helps from developers of our group. If you need helps to locate and handle problems or have any idea to improve Egg, mark it as `support`.
- `bug`: if you find a problem which possiblly could be a bug, please tag it as `bug`. Then our group members will review that issue. If it is confirmed as a bug by our group member, this issue will be tagged as `confirmed`.
- A confirmed bug will be resolved prior.
- If the bug has negative impact on running online application, it will be tagged as `ciritical`, which refers to top priority, and will be fixed ASAP!
Expand All @@ -31,36 +32,36 @@ Tags can be divided into two groups, `type` and `scope`.
All features must be submitted along with documentations. The documentations should satify several requirements.

- Documentations must clarify one or more aspects of the feature, depending on the nature of feature: what it is, why it happens and how it works.
- It's better to include a series of procedues to explain how to fix the problem. You are also encourgaed to provide **simple, but self-explanatory** demo.
All demos should be compiled at [egg/examples](https://github.com/eggjs/examples) repository.
- It's better to include a series of procedues to explain how to fix the problem. You are also encourgaed to provide **simple, but self-explanatory** demo.
All demos should be compiled at [eggjs/examples](https://github.com/eggjs/examples) repository.
- Please provide essential urls, such as application process, terminology explainations and references.

## Submitting Code

### Pull Request Guide

If you are developer of egg repo and you are willing to contribute, feel free to create a new branch, finish your modification and submit a PR. Egg group will review your work and merge it to master branch.
If you are developer of egg repo and you are willing to contribute, feel free to create a new branch, finish your modification and submit a PR. Egg group will review your work and merge it to master branch.

```bash
// Create a new branch for development. The name of branch should be semantic, avoiding words like 'update' or 'tmp'. We suggest to use feature/xxx, if the modification is about to implement a new feature.
# Create a new branch for development. The name of branch should be semantic, avoiding words like 'update' or 'tmp'. We suggest to use feature/xxx, if the modification is about to implement a new feature.
$ git checkout -b branch-name

// Run the test after you finish your modification. Add new test cases or change old ones if you feel necessary
# Run the test after you finish your modification. Add new test cases or change old ones if you feel necessary
$ npm test

// If your modification pass the tests, congradulations it's time to push your work back to us. Notice that the commit message should be wirtten in the following format.
$ git add . // git add -u to delete files
# If your modification pass the tests, congradulations it's time to push your work back to us. Notice that the commit message should be wirtten in the following format.
$ git add . # git add -u to delete files
$ git commit -m "fix(role): role.use must xxx"
$ git push origin branch-name
```

Then you can create a Pull Request at [egg](https://github.com/eggjs/egg/pulls)
Then you can create a Pull Request at [egg](https://github.com/eggjs/egg/pulls)

No one can garantee how much will be remembered about certain PR after some time. To make sure we can easily recap what happened previously, please provide the following information in your PR.

1. Need: What function you want to achieve (Generally, please point out which issue is related).
2. Updating Reason: Different with issue. Briefly describe your reason and logic about why you need to make such modification.
3. Related Testing: Briefly descirbe what part of testing is relevant to your modification.
2. Updating Reason: Different with issue. Briefly describe your reason and logic about why you need to make such modification.
3. Related Testing: Briefly descirbe what part of testing is relevant to your modification.
4. User Tips: Notice for Egg users. You can skip this part, if the PR is not about update in API or potential compatibility problem.

### Style Guide
Expand All @@ -69,7 +70,7 @@ Eslint can help to identify styling issues that may exist in your code. Your cod

### Commit Message Format

You are encouraged to use [angular commit-message-format](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format) to write commit message. In this way, we could have a more trackable history and an automatically generated changelog.
You are encouraged to use [angular commit-message-format](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format) to write commit message. In this way, we could have a more trackable history and an automatically generated changelog.

```xml
<type>(<scope>): <subject>
Expand Down Expand Up @@ -139,15 +140,15 @@ egg uses semantic versioning in release process based on [semver].

`master` branch is the latest stable version. `next` branch is the next stable version working in progress.

- All new features will be added into `master` or `next` branch as well as all bug-fix except security issues. In such way, we can motivate developers to update to the latest stable version.
- All new features will be added into `master` or `next` branch as well as all bug-fix except security issues. In such way, we can motivate developers to update to the latest stable version.
- If any API is discarded, it should be noted with `deprecate` in current stable version. The old version of API should be compatiable until the release of next stable version.
- `master` branch doesn't have publish tag. High-level framework can work with stable versions defined by semantic versioning.
- `next` branch is labelled with `next` tag, high-level framework can use `egg@next` to test the in-progress version.
- The LTS versions of Egg determined by Milestone. If a version is listed in Milestone, then it is a LTS version. We will patch it if there is any problem with it.

### Release Strategy

In the release of every stable version, there will be a PM who has the following responsibilities in different stages of the release.
In the release of every stable version, there will be a PM who has the following responsibilities in different stages of the release.

#### Preparation

Expand Down Expand Up @@ -177,5 +178,4 @@ All tags mentioned above refere to adding tags from npm in `package.json`.
[Release proposal MR]: https://github.com/nodejs/node/pull/4181
[node CHANGELOG]: https://github.com/nodejs/node/blob/master/CHANGELOG.md
[1.x milestone]: https://github.com/eggjs/egg/milestone/1
[alinpm]: http://web.npm.alibaba-inc.com/
[『我是如何发布一个 npm 包的』]: https://fengmk2.com/blog/2016/how-i-publish-a-npm-package
23 changes: 12 additions & 11 deletions CONTRIBUTING.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@

- 必须说清楚问题的几个方面:what(是什么),why(为什么),how(怎么做),可根据问题的特性有所侧重。
- how 部分必须包含详尽完整的操作步骤,必要时附上 **足够简单,可运行** 的范例代码,
所有范例代码放在 [egg/examples](https://github.com/eggjs/examples) 库中。
所有范例代码放在 [eggjs/examples](https://github.com/eggjs/examples) 库中。
- 提供必要的链接,如申请流程,术语解释和参考文档等。
- 同步修改中英文文档,或者在 PR 里面说明。

## 提交代码

Expand All @@ -46,15 +47,15 @@
如果你有仓库的开发者权限,而且希望贡献代码,那么你可以创建分支修改代码提交 MR,egg 开发团队会 review 代码合并到主干。

```bash
// 先创建开发分支开发,分支名应该有含义,避免使用 update、tmp 之类的
# 先创建开发分支开发,分支名应该有含义,避免使用 update、tmp 之类的
$ git checkout -b branch-name

// 开发完成后跑下测试是否通过,必要时需要新增或修改测试用例
$ tnpm test
# 开发完成后跑下测试是否通过,必要时需要新增或修改测试用例
$ npm test

// 测试通过后,提交代码,message 见下面的规范
# 测试通过后,提交代码,message 见下面的规范

$ git add . // git add -u 删除文件
$ git add . # git add -u 删除文件
$ git commit -m "fix(role): role.use must xxx"
$ git push origin branch-name
```
Expand Down Expand Up @@ -164,17 +165,17 @@ egg 基于 [semver] 语义化版本号进行发布。

- 确认当前 Milestone 所有的 issue 都已关闭或可延期,完成性能测试。
- 发起一个新的 [Release Proposal MR],按照 [node CHANGELOG] 进行 `History` 的编写,修正文档中与版本相关的内容,commits 可以自动生成。
```
```bash
$ npm run commits
```
- 指定下一个大版本的 PM。

#### 发布时:

- 将老的稳定版本(master)备份到以当前大版本为名字的分支上(例如 `1.x`),并设置 tag 为 `release-{v}.x`( v 为当前版本,例如 `release-1.x`)。
- 将 `next` 分支推送到 `master`,成为新的稳定版本分支,并去除 `next` tag,修改 README 中与分支相关的内容(CISE task id)
- 发布新的稳定版本到 [alinpm],并通知上层框架进行更新。
- `tnpm publish` 之前,请先阅读[『我是如何发布一个 npm 包的』]。
- 将 `next` 分支推送到 `master`,成为新的稳定版本分支,并去除 `next` tag,修改 README 中与分支相关的内容。
- 发布新的稳定版本到 [npm],并通知上层框架进行更新。
- `npm publish` 之前,请先阅读[『我是如何发布一个 npm 包的』]。

上述描述中所有的设置 tag 都是指在 `package.json` 中设置 npm 的 tag。

Expand All @@ -188,5 +189,5 @@ egg 基于 [semver] 语义化版本号进行发布。
[Release proposal MR]: https://github.com/nodejs/node/pull/4181
[node CHANGELOG]: https://github.com/nodejs/node/blob/master/CHANGELOG.md
[1.x milestone]: https://github.com/eggjs/egg/milestone/1
[alinpm]: http://web.npm.alibaba-inc.com/
[npm]: http://npmjs.com/
[『我是如何发布一个 npm 包的』]: https://fengmk2.com/blog/2016/how-i-publish-a-npm-package
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ Born to build better enterprise frameworks and apps

## Installation


```bash
$ npm install egg --save
```

Node.js >= 4.0.0 required, check [document for installation](https://eggjs.org/guide/installation.html).
Node.js >= 6.0.0 required.

## Features

Expand All @@ -40,7 +39,7 @@ Node.js >= 4.0.0 required, check [document for installation](https://eggjs.org/g

## Docs & Community

- [Website](https://eggjs.org)
- [Website && Document](https://eggjs.org)
- [Plugin List](https://eggjs.org/badgeboard/)
- [Frameworks](https://eggjs.org/frameworks.html)

Expand All @@ -58,6 +57,8 @@ $ open http://localhost:7001

## Examples

See [egg-examples](https://github.com/eggjs/examples).

## How to Contribute

Please let us know what we can help, check [issues](https://github.com/eggjs/egg/issues) for bug reporting and suggestion.
Expand Down
23 changes: 11 additions & 12 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![](https://raw.githubusercontent.com/eggjs/egg/master/docs/assets/egg-logo.png)

为企业级框架和应用而生
为企业级框架和应用而生的 Web 框架

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
Expand Down Expand Up @@ -28,26 +28,23 @@
$ npm install egg --save
```

Node.js >= 4.0.0 required, check [document for installation](https://eggjs.org/guide/installation.html).
支持 Node.js 6.x 以上版本。

## 特性

- ✔︎ Build-in process management
- ✔︎ Plugin system
- ✔︎ Framework customization
- ✔︎ Lots of [plugins](https://eggjs.org/badgeboard/)
)
- ✔︎ 内置多进程管理
- ✔︎ 高度可扩展的插件机制
- ✔︎ 深度框架定制
- ✔︎ 丰富的[插件](https://eggjs.org/badgeboard/)

## 文档和社区

- [Website](https://eggjs.org)
- [Plugin List](https://eggjs.org/badgeboard/)
- [Frameworks](https://eggjs.org/frameworks.html)
- [官方站点 && 文档](https://eggjs.org/zh-cn/)
- [插件列表](https://eggjs.org/badgeboard/)
- [框架列表](https://eggjs.org/frameworks.html)

## 快速开始

Follow the step

```bash
$ npm install egg-init -g
$ egg-init --type simple showcase && cd showcase
Expand All @@ -58,6 +55,8 @@ $ open http://localhost:7001

## 示例

参见 [egg-examples](https://github.com/eggjs/examples)

## 贡献代码

Please let us know what we can help, check [issues](https://github.com/eggjs/egg/issues) for bug reporting and suggestion.
Expand Down
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
environment:
matrix:
- nodejs_version: '4'
- nodejs_version: '6'
- nodejs_version: '7'

Expand Down
2 changes: 1 addition & 1 deletion docs/source/zh-cn/core/view.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module.exports = function* home(){
// `app.locals` 会合并到 `this.locals
this.app.locals = { a: 1 };
this.locals.b = 2;
console.log(this.locals); // { a: 1, b: 1 }
console.log(this.locals); // { a: 1, b: 2 }

// 一次请求过程中,仅会在第一次使用 `this.locals` 时把 `app.locals` 合并进去。
this.app.locals = { a: 2 };
Expand Down
43 changes: 22 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@
"agentkeepalive": "^3.0.0",
"cluster-client": "^1.0.1",
"co": "^4.6.0",
"debug": "^2.3.3",
"debug": "^2.6.0",
"delegates": "^1.0.0",
"egg-cluster": "^1.0.0",
"egg-cluster": "^1.2.0",
"egg-cookies": "^2.1.0",
"egg-core": "^1.3.1",
"egg-development": "^1.0.2",
"egg-i18n": "^1.0.2",
"egg-logger": "^1.4.1",
"egg-core": "^1.4.0",
"egg-development": "^1.1.0",
"egg-i18n": "^1.1.0",
"egg-logger": "^1.5.0",
"egg-logrotator": "^2.2.2",
"egg-multipart": "^1.0.0",
"egg-onerror": "^1.1.0",
"egg-onerror": "^1.2.2",
"egg-schedule": "^2.2.1",
"egg-security": "^1.2.1",
"egg-security": "^1.3.0",
"egg-session": "^1.1.0",
"egg-static": "^1.0.0",
"egg-static": "^1.1.0",
"egg-userrole": "^1.0.0",
"egg-userservice": "^1.0.0",
"egg-validate": "^1.0.0",
Expand All @@ -44,9 +44,9 @@
"koa-is-json": "^1.0.0",
"koa-override": "^1.0.0",
"mime-types": "^2.1.13",
"sdk-base": "^2.0.1",
"sdk-base": "^3.0.1",
"sendmessage": "^1.1.0",
"urllib": "^2.17.1"
"urllib": "^2.19.0"
},
"devDependencies": {
"autod": "^2.7.1",
Expand All @@ -58,31 +58,32 @@
"egg-alinode": "^1.0.3",
"egg-bin": "^1.3.0",
"egg-ci": "^1.0.3",
"egg-mock": "^1.2.0",
"egg-mock": "^2.0.0",
"egg-plugin-puml": "^1.0.0",
"egg-view-nunjucks": "^0.5.0",
"eslint": "^3.11.1",
"eslint": "^3.13.1",
"eslint-config-egg": "^3.1.0",
"estraverse": "^4.1.1",
"formstream": "^1.0.0",
"formstream": "^1.1.0",
"glob": "^7.1.1",
"ko-sleep": "^1.0.2",
"koa": "^1.2.4",
"koa-router": "^5.4.0",
"koa-router": "^7.1.0",
"merge-descriptors": "^1.0.1",
"moment": "^2.17.0",
"mm": "^2.0.0",
"moment": "^2.17.1",
"mz": "^2.4.0",
"npminstall": "^2.1.1",
"nunjucks": "^3.0.0",
"once": "^1.3.3",
"pedding": "^1.1.0",
"rds": "^0.1.0",
"rimraf": "^2.5.4",
"should": "^11.1.1",
"should": "^11.1.2",
"stream-wormhole": "^1.0.0",
"supertest": "^2.0.1",
"toa": "^2.4.1",
"toa-router": "^1.5.2"
"toa": "^2.5.0",
"toa-router": "^2.0.1"
},
"main": "index.js",
"files": [
Expand Down Expand Up @@ -110,10 +111,10 @@
"url": "https://github.com/eggjs/egg.git"
},
"engines": {
"node": ">= 4.0.0"
"node": ">=6.0.0"
},
"ci": {
"version": "4, 6, 7"
"version": "6, 7"
},
"license": "MIT"
}

0 comments on commit ecbed08

Please sign in to comment.