angular / angular/angular-cli

Add new "common" schematic to share configurations for all schematics at once

Aperta
#33,221 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
area: @angular-devkit/schematics gemini-triaged
Lingua principale
TypeScript
Stelle
27k
Fork
11.8k
Merge medio
14h 23m
PR unite (30g)
162

Descrizione

### Command

generate

### Description

Implement an internal artifact to commonize the configuration of schematics so that all schematics can share a common configuration by default, and override on a per-artifact basis if needed. Currently, all configurations are duplicated, and while not that annoying to deal with for a single collection, it can quickly add up when using several collections.

### Describe the solution you'd like

Actual :
```json
{
"schematics": {
"@schematics/angular:component": { "skipSelector": true },
"@schematics/angular:directive": { "skipSelector": true },
"@schematics/angular:pipe": { "skipSelector": true }
}
}
```
Proposed :
```json
{
"schematics": {
"@schematics/angular:common": { "skipSelector": true }
}
}
```

This new `common` schematic would contain either
- only fields that are common to all artifacts
- All fields possible, even if not applicable to certain artifacts

Resolving would follow this pattern :
- Look for common artifact schematic value
- If existing, apply value
- If all fields are possible : also check if value is applicable to artifact
- Look for direct artifact schematic value
- Override value

### Describe alternatives you've considered

Doing it by hand as already done today is the only solution

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con il comando generate e il percorso di risoluzione della configurazione degli schematic. Confronta la configurazione comune proposta con la configurazione attuale per artefatto, quindi definisci come vengono applicati i valori comuni e come i valori diretti dell’artefatto li sovrascrivono. Il lavoro è completo quando gli schematic possono ereditare valori predefiniti condivisi mantenendo le sovrascritture per artefatto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
cli
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.