angular / angular/angular-cli

Alternative lookup convention for `ng-add` schematics

Ouverte
#13,026 3 commentaires 4 réactions 0 personnes assignées Voir sur GitHub
area: @angular/cli 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

It would be nice to be able to externalize schematics from the package specified in the `ng add` command.

`ng add ionic` requires us to include schematics within the `ionic` package itself, which is not ideal for several reasons:
- **Separation of Concerns**. The `ionic` package isn't necessarily for Angular, but `ng add ionic` looks good 👌
- **Complication of the build within our main package.** Including the schematics in our main package would require including _a lot_ of the Angular DevKit into the build.
- **Slow "add".** It requires installing the entire package and all its dependencies (~38M) in a sandbox just to use a few files from the package.

In slack I believe we concluded that the best solution might be to have the `ng-add` field within `package.json` be allowed to point to another package.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la commande `ng add` et le champ `ng-add` dans `package.json` ; examinez comment le package spécifié est actuellement utilisé pour les schematics. C'est terminé lorsqu'une entrée `ng-add` peut pointer vers un autre package, ce qui permet d'externaliser les schematics du package nommé dans la commande.

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

Évaluation

Stack technique
angular, typescript
Domaine
cli
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
30/100

Recevez les nouvelles issues par e-mail

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