Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(middleware): use async #1703

Merged
merged 2 commits into from
Nov 23, 2017
Merged

docs(middleware): use async #1703

merged 2 commits into from
Nov 23, 2017

Conversation

atian25
Copy link
Member

@atian25 atian25 commented Nov 23, 2017

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

@codecov-io
Copy link

Codecov Report

Merging #1703 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1703   +/-   ##
=======================================
  Coverage   99.58%   99.58%           
=======================================
  Files          29       29           
  Lines         717      717           
=======================================
  Hits          714      714           
  Misses          3        3

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 089b76a...fb8e621. Read the comment docs.

- async function: `async (ctx, next) => {}`
- generator function: `function* (next) {}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generator function 的用法去掉吧

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

就这一句还好吧,因为上面还有个 框架兼容 Koa 1.x 和 2.x 支持的所有形式的中间件,包括:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

别加了,因为这个很影响性能,而且 koa 1.x 估计以后都不会怎么维护了

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉上面也可以不去区分 koa 1.x 和 koa 2.x 了,直接写兼容 koa 的中间件就好了

Copy link
Member Author

@atian25 atian25 Nov 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是干掉还是注明一个 1.x 不推荐就好了?

现在 koa 社区应该还有很多存量的 koa1 中间件吧?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

干掉吧

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

干掉了

@atian25 atian25 force-pushed the docs-2.x-middleware branch from 70ea0b6 to 5b3a98c Compare November 23, 2017 09:25
@dead-horse dead-horse merged commit 11c6887 into master Nov 23, 2017
@dead-horse dead-horse deleted the docs-2.x-middleware branch November 23, 2017 09:26
popomore pushed a commit that referenced this pull request Nov 23, 2017
docs(middleware): use async (#1703)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants