angular / angular/angular-cli

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

Abierto
#33,221 1 comentario 0 reacciones 0 asignados Ver en GitHub
area: @angular-devkit/schematics gemini-triaged
Lenguaje dominante
TypeScript
Estrellas
27k
Forks
11.8k
Merge medio
14 h 23 min
PR fusionados (30 d)
162

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con el comando generate y la ruta de resolución de la configuración de schematic. Compara la configuración común propuesta con la configuración actual por artefacto y, después, define cómo se aplican los valores comunes y cómo los valores directos del artefacto los sobrescriben. Se considera terminado cuando los schematics pueden heredar valores predeterminados compartidos y conservar las sobrescrituras por artefacto.

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

Evaluación

Stack tecnológico
typescript
Área
cli
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.