Library secondary entry-point generation
- 主要語言
- TypeScript
- 星號
- 27k
- 分支
- 11.8k
- 平均合併
- 14 小時 23 分鐘
- 30 天內合併 PR
- 162
描述
# 🚀 Feature request
### Command (mark with an `x`)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [x] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
### Description
Creating a secondary entry points for libraries is a manual effort with a risk of misconfiguration of unit testing environment.
In order to get a proper coverage report for all the libraries, the following needs to be adjusted:
- in `test.ts` the context path should be changed: `const context = require.context('../', true, /\.spec\.ts$/);`
- in `angular.json` the `sourceRoot` path should be changed: `"sourceRoot": "projects/lib-name",` (no `/src`)
### Describe the solution you'd like
Create a schematic that generates the secondary entry point for the given library.
---
I would be happy to provide a PR if this get's greenlit.
貢獻指南
研究方向
從 generate 命令開始,檢查現有的 library schematic 結構。查看 test.ts 和 angular.json,尤其是 issue 中描述的 context path 和 sourceRoot 設定。完成的標準是,schematic 能夠產生帶有所需測試和涵蓋率設定的 library 次要進入點。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- angular, typescript
- 領域
- build-system, cli, testing
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100