Skip to content

feat: support eggScriptsConfig in package.json - #41

Merged
dead-horse merged 2 commits into
masterfrom
eggScriptsConfig
Dec 16, 2019
Merged

feat: support eggScriptsConfig in package.json#41
dead-horse merged 2 commits into
masterfrom
eggScriptsConfig

Conversation

@dead-horse

Copy link
Copy Markdown
Member
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

Comment threadREADME.md

```json
{
"eggScriptsConfig": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

是否改成 config 节点下比较好?

{
"config": {
"eggScripts": { ... }
}
}

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

现在有 egg, eggPlugin 等一系列配置了,还是先平铺吧?

@codecov

codecovBot commented Dec 16, 2019

Copy link
Copy Markdown

Codecov Report

Merging #41 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@ Coverage Diff @@## master #41 +/- ##
==========================================
+ Coverage 98.54% 98.56% +0.02% 
==========================================
Files 6 6 Lines 206 209 +3 ==========================================
+ Hits 203 206 +3 
Misses 3 3
Impacted FilesCoverage Δ
lib/cmd/start.js99.15% <ø> (ø)⬆️
lib/command.js100% <100%> (ø)⬆️

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 df9933a...1c77f2c. Read the comment docs.

@dead-horse
dead-horse merged commit 20483fd into masterDec 16, 2019
@dead-horse
dead-horse deleted the eggScriptsConfig branch December 16, 2019 07:33
@dead-horse

Copy link
Copy Markdown
MemberAuthor

2.12.0

Comment threadlib/command.js
// read argv from eggScriptsConfig in package.json
if (pkgInfo && pkgInfo.eggScriptsConfig && typeof pkgInfo.eggScriptsConfig === 'object') {
for (const key in pkgInfo.eggScriptsConfig) {
if (argv[key] == null) argv[key] = pkgInfo.eggScriptsConfig[key];

@atian25atian25Apr 28, 2022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

结合 https://github.com/node-modules/common-bin/blob/master/lib/helper.js#L180

应该可以通过 node-options--max-http-header-size 的方式来注入 Node 启动参数

目前不支持,提了个 PR:#54

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@dead-horse@fengmk2@atian25