feat: view base promise to support async function - #343
Merged
Conversation
|
@dead-horse, thanks for your PR! By analyzing the history of the files in this pull request, we identified @fengmk2, @popomore and @atian25 to be potential reviewers. |
dead-horse
force-pushed
the
view-promise
branch
from
February 9, 2017 09:39
b948eb9 to
da2cddd
Compare
atian25
approved these changes
Feb 9, 2017
| */ | ||
| * render(name, locals) { | ||
| this.body = yield this.renderView(name, locals); | ||
| render(name, locals) { |
Member
There was a problem hiding this comment.
这里还涉及到几个地方的关联修改:
- view 插件规范文档
- egg-view-nunjucks 插件里面的基类也要改为 promise base 的, break change 了吧
Member
There was a problem hiding this comment.
dead-horse
force-pushed
the
view-promise
branch
from
February 9, 2017 09:50
da2cddd to
409add8
Compare
Codecov Report@@ Coverage Diff @@
## master #343 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 28 28
Lines 635 636 +1
=====================================
+ Hits 635 636 +1
Continue to review full report at Codecov.
|
atian25
reviewed
Feb 9, 2017
| @@ -296,10 +296,10 @@ function loadFilter() { | |||
| - 该子类会在原 render 方法的基础上,增加对 locals 的注入。 | |||
|
|
|||
| 有兴趣的同学可以看下对应的源码: | |||
Member
Author
There was a problem hiding this comment.
那个另起 PR 改吧,这次只改 generator function 相关的
popomore
approved these changes
Feb 9, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
npm testpassesAffected core subsystem(s)
view
Description of change
remove generator function api to support async functions