Library secondary entry-point generation
- Vorherrschende Sprache
- TypeScript
- Sterne
- 27k
- Forks
- 11.8k
- Ø Merge
- 14 Std. 23 Min.
- Gemergte PRs (30 T.)
- 162
Beschreibung
# 🚀 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.
Beitragsleitfaden
Rechercherichtung
Beginne mit dem generate-Befehl und untersuche die vorhandene Struktur des Library-Schematics. Überprüfe test.ts und angular.json, insbesondere die im Issue beschriebenen Einstellungen für context path und sourceRoot. Fertig ist die Aufgabe, wenn ein Schematic einen sekundären Einstiegspunkt einer Library mit der erforderlichen Konfiguration für Tests und Coverage generieren kann.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- build-system, cli, testing
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100