Conversation
28 tasks
Codecov Report
@@ Coverage Diff @@
## master #19 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 6 6
Lines 169 187 +18
=====================================
+ Hits 169 187 +18
Continue to review full report at Codecov.
|
fe1b61e to
df712bc
Compare
popomore
reviewed
Apr 2, 2018
| execArgvObj.require.push(require.resolve('source-map-support/register')); | ||
| } | ||
|
|
||
| argv.sourcemap = argv.typescript = argv.ts = undefined; |
Member
Author
There was a problem hiding this comment.
- 这里其实一句
argv.sourcemap = undefined也够了。 上面有个 https://github.com/eggjs/egg-scripts/blob/ts/lib/command.js#L16 会自动删除别名。 - 之前的想法是,上层业务框架可能会自定义一些入参,这里更倾向于黑名单机制,也就是明确在工具层用的入参,在这里删掉。否则白名单机制的话,上层业务框架就要定制 egg-scripts 。
| // execArgv | ||
| if (argv.sourcemap) { | ||
| execArgvObj.require = execArgvObj.require || []; | ||
| execArgvObj.require.push(require.resolve('source-map-support/register')); |
Member
Author
There was a problem hiding this comment.
ts 支持生成 sourcemap,这里是用来根据 sourcemap 还原堆栈的。可以看看 https://zhuanlan.zhihu.com/p/26267678
之前这个 require 都是放到 config 或 app.js agent.js ,或者放框架。
现在这个 PR 是直接在工具层引入了。
Member
Author
|
ping @popomore |
popomore
approved these changes
Apr 3, 2018
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)
Description of change