angular / angular/angular-cli

Alternative lookup convention for `ng-add` schematics

Offen
#13,026 3 Kommentare 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area: @angular/cli feature feature: insufficient votes
Vorherrschende Sprache
TypeScript
Sterne
27k
Forks
11.8k
Ø Merge
14 Std. 23 Min.
Gemergte PRs (30 T.)
162

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie mit dem Befehl `ng add` und dem Feld `ng-add` in `package.json`; prüfen Sie, wie das angegebene Paket derzeit für Schematics verwendet wird. Als abgeschlossen gilt die Änderung, wenn ein `ng-add`-Eintrag auf ein anderes Paket verweisen kann, sodass Schematics aus dem im Befehl genannten Paket ausgelagert werden können.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
angular, typescript
Bereich
cli
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.