angular / angular/angular-cli

Library secondary entry-point generation

Ouverte
#19,070 3 commentaires 9 réactions 0 personnes assignées Voir sur GitHub
area: @schematics/angular feature feature: insufficient votes
Langage dominant
TypeScript
Étoiles
27k
Forks
11.8k
Merge moyen
14 h 23 min
PR mergées (30 j)
162

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la commande generate et examinez la structure existante du schematic de library. Examinez test.ts et angular.json, en particulier les paramètres de context path et sourceRoot décrits dans l’issue. Le travail est terminé lorsqu’un schematic peut générer un point d’entrée secondaire d’une library avec la configuration nécessaire pour les tests et la couverture.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
build-system, cli, testing
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.