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

Feat: support read egg.require from package.json #120

Closed
wants to merge 4 commits into from

Conversation

whxaxes
Copy link
Member

@whxaxes whxaxes commented Jan 2, 2019

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
  • feat: 支持在 package.json 中读取 egg.require,这样在 ts 项目中就不需要在每个 command 中都加 -r,scripts 就可以精简成
{
  "name": "demo-app",
  "egg": {
    "framework": "aliyun-egg",
    "typescript": true,
    "require": [
      "tsconfig-paths/register",
      "egg-ts-helper/register"
    ]
  },
  "scripts": {
    "dev": "egg-bin dev",
    "test": "npm run lint -- --fix && npm run test-local",
    "debug": "egg-bin debug",
    "test-local": "egg-bin test",
    "cov": "egg-bin cov"
  }
}
  • fix: 移除对 _[0] 的读取,这个会带来坑,比如当 _[0] 为文件的时候,baseDir 就出错了,再加上文档上本来就没有描述 _[0] ,因此当 bug 进行移除。

@whxaxes whxaxes requested review from atian25 and popomore January 2, 2019 09:05
@whxaxes
Copy link
Member Author

whxaxes commented Jan 2, 2019

怎么 travis 不会被触发了 ?

@whxaxes
Copy link
Member Author

whxaxes commented Jan 2, 2019

这个分支的 ci 不知道为啥没有在 travis 创建成功,新建了个 PR #121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant