Skip to content

Commit

Permalink
docs: add progressive link && adjust en docs directory (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
atian25 authored and popomore committed Jan 19, 2017
1 parent 43e2161 commit d38ac7a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
File renamed without changes.
12 changes: 6 additions & 6 deletions docs/source/en/intro/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ And also add config.

```js
// config/config.default.js
config.news = {
exports.news = {
pageSize: 5,
serverUrl: 'https://hacker-news.firebaseio.com/v0',
};
Expand Down Expand Up @@ -403,12 +403,12 @@ That is all of it, for more detail, see [Unit Testing](../core/unittest.md).

## Conclusions

We can only touch the tip of the iceberg of Egg
with the above short sections.
We recommend that developers continue reading other documents:
We can only touch the tip of the iceberg of Egg with the above short sections.
Where to go from here? Browse our documentation to better understand the framework.
- Egg provides a powerful mechanism for extending features. See [Plug-ins](../advanced/plugin.md).
- As large teams need to follow certain constraints and conventions, in egg, we recommend further creating an upper-level framework that fits your team. See [Frameworks](../advanced/framework.md).
- In Egg, writing unit tests is highly recommended, and it actually turns out to be very straightforward. See [Unit Testing](../core/test.md).
- Egg framework allows small or large teams to work together as fast as possible under the well-documented conventions and coding best practices. In addition, the teams can build up logics on top of the framework to better suited their special needs. See more on [Frameworks].(../advanced/framework.md).
- Egg framework provides code reusabilities and modularities. See details at [Progressive](../tutorials/progressive.md).
- Egg framework enables developers to write painless unit testing with many plugins and community-powered toolings. The team should give it a try by using Egg unit testing without worrying about setting up the testing tooling but writing the testing logics. See [Unit Testing](../core/test.md).

[nvm]: http://gitlab.alibaba-inc.com/node/nvm
[nvs]: https://github.com/jasongin/nvs
Expand Down
2 changes: 2 additions & 0 deletions docs/source/zh-cn/advanced/framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ title: 框架开发

这样,整个团队就可以遵循统一的方案,并且在项目中可以根据业务场景自行使用插件做差异化,当后者验证为最佳实践后,就能下沉到框架中,其他项目仅需简单的升级下框架的版本即可享受到。

具体可以参见[渐进式开发](../tutorials/progressive.md)

## 框架与多进程

框架的扩展是和多进程模型有关的,我们已经知道[多进程模型](./cluster.md),也知道 Agent Worker 和 App Worker 的区别,所以我们需要扩展的类也有两个 Agent 和 Application,而这两个类的 API 不一定相同。
Expand Down
17 changes: 9 additions & 8 deletions docs/source/zh-cn/intro/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ exports.view = {
};
```

为列表页编写模板文件,一般放置在 app/view 目录下
为列表页编写模板文件,一般放置在 `app/view` 目录下

``` html
<!-- app/view/news/list.tpl -->
Expand Down Expand Up @@ -221,7 +221,7 @@ exports.list = function* newsList() {

```js
// config/config.default.js
config.news = {
exports.news = {
pageSize: 5,
serverUrl: 'https://hacker-news.firebaseio.com/v0',
};
Expand All @@ -231,7 +231,7 @@ config.news = {

遇到一个小问题,我们的资讯时间的数据是 UnixTime 格式的,我们希望显示为便于阅读的格式。

框架提供了一种快速扩展的方式,只需在 `app/extend` 目录下提供扩展脚本即可,具体参见 [扩展](../basics/extend.md)
框架提供了一种快速扩展的方式,只需在 `app/extend` 目录下提供扩展脚本即可,具体参见[扩展](../basics/extend.md)

在这里,我们可以使用 view 插件支持的 helper 来实现:

Expand Down Expand Up @@ -291,7 +291,7 @@ exports.robot = {

- 支持按环境变量加载不同的配置文件,如 `config.local.js``config.prod.js` 等等。
- 应用/插件/框架都可以配置自己的配置文件,框架将按顺序合并加载。
- 具体合并逻辑可参见 [配置文件](../basics/config.md)
- 具体合并逻辑可参见[配置文件](../basics/config.md)

```js
// config/config.default.js
Expand Down Expand Up @@ -368,15 +368,16 @@ $ npm i egg-mock supertest --save-dev
$ npm test
```

就这么简单,更多请参见 [单元测试](../core/unittest.md)
就这么简单,更多请参见[单元测试](../core/unittest.md)

## 后记

短短几章内容,只能讲 egg 的冰山一角,我们建议开发者继续阅读其他章节:

- 提供了强大的扩展机制,参见 [插件开发](../advanced/plugin.md)
- 一个大规模的团队需要遵循一定的约束和约定,在 egg 里我们建议封装适合自己团队的上层框架,参见 [框架开发](../advanced/framework.md)
- 写单元测试其实很简单的事,egg 也提供了非常多的配套辅助,我们强烈建议大家测试驱动开发,具体参见 [单元测试](../core/unittest.md)
- 提供了强大的扩展机制,参见[插件开发](../advanced/plugin.md)
- 一个大规模的团队需要遵循一定的约束和约定,在 egg 里我们建议封装适合自己团队的上层框架,参见[框架开发](../advanced/framework.md)
- 这是一个渐进式的框架,代码的共建,复用和下沉,竟然可以这么的无痛,建议阅读[渐进式开发](../tutorials/progressive.md)
- 写单元测试其实很简单的事,egg 也提供了非常多的配套辅助,我们强烈建议大家测试驱动开发,具体参见[单元测试](../core/unittest.md)

[nvm]: http://gitlab.alibaba-inc.com/node/nvm
[nvs]: https://github.com/jasongin/nvs
Expand Down
2 changes: 1 addition & 1 deletion docs/source/zh-cn/tutorials/progressive.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: 渐进式开发

本文将以实例的方式,一步步给大家演示下,如何渐进式地进行代码演进。

全部的示例代码可以参见 [eggjs/examples/progressive](https://github.com/eggjs/examples/progressive)
全部的示例代码可以参见 [eggjs/examples/progressive](https://github.com/eggjs/examples/tree/master/progressive)

## 最初始的状态

Expand Down
2 changes: 1 addition & 1 deletion docs/themes/egg/layout/index.swig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</div>

<div class="version">
<span>Latest: <strong>0.7.0</strong></span>
<span>Latest: <strong>0.8.0</strong></span>
<span>Node.js >= <strong> 6.0.0</strong></span>
</div>

Expand Down

0 comments on commit d38ac7a

Please sign in to comment.