angular / angular/angular-cli

Library secondary entry-point generation

Abierto
#19,070 3 comentarios 9 reacciones 0 asignados Ver en GitHub
area: @schematics/angular feature feature: insufficient votes
Lenguaje dominante
TypeScript
Estrellas
27k
Forks
11.8k
Merge medio
14 h 23 min
PR fusionados (30 d)
162

Descripción

# 🚀 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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza con el comando generate e inspecciona la estructura existente del schematic de library. Revisa test.ts y angular.json, especialmente la configuración de context path y sourceRoot descrita en el issue. Se considera terminado cuando un schematic pueda generar un punto de entrada secundario de una library con la configuración necesaria de pruebas y cobertura.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
build-system, cli, testing
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.