Flatten glob "assets" to one output folder
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- angular, typescript
- Área
- build-system, cli
Línea de trabajo
Comienza con la configuración de exportación de assets y compara cómo ng serve, ng build --watch y una compilación normal procesan el glob mostrado. El cambio estará completo cuando los assets anidados puedan emitirse directamente bajo dist/assets sin las carpetas intermedias module y assets, y sigan estando disponibles para el flujo de trabajo de serve en memoria.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
🚀 Feature request
- [ ] new
- [x] build
- [x] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Description
I am currently working with nested assets folder per entity map. Currently, I am using the following assets export settings:
{
"glob": "**/assets/**/*",
"input": "src/app",
"output": "/assets",
"ignore": ["**/*.ts"]
}
Imagine having the following file structure:
src
├── app
| ├── module-folder
| | ├── assets
| | │ ├── images
| | │ │ └── image1.png
| ├──other-module-folder
| | ├── assets
| | │ ├── images
| | │ │ └── image2.png
What I get
This would result in the following dist/ file structure:
dir
├── assets
| ├── module-folder
| | ├── assets
| | │ ├── images
| | │ │ └── image1.png
| ├──other-module-folder
| | ├── assets
| | │ ├── images
| | │ │ └── image2.png
What I want to have
dir
├── assets
| ├── image1.png
| └── image2.png
What I have tried
I have tried to use a custom script to move the assets files manually in a flatten way to the dir folder.
for file in ./src/app/**/assets/**/*.*; do cp "$file" "./dist/assets/$(basename -- "$file")" ;done
This, however, does not work in combination with ng serve as the files are in-memory, and also does not work with the ng build --watch as I am unsure how to activate script after it has been built.
I would love to get some insight into the best approach. Maybe this is simply using an already existing flow. From my point of view, this should be included as functionality, as the nested folder structure strategy seems to be one of the more common approaches.
- Lenguaje dominante
- TypeScript
- Estrellas
- 27k
- Forks
- 11.8k
- Merge medio
- 17 h 25 min
- PR fusionados (30 d)
- 183
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de angular/angular-cli
-
Can't use an array of hostnames in --allowedHosts cli parameter in @angular/build:dev-server Abiertoarea: @angular/build gemini-triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
angular/angular-cli#33055 · 1 comentario · 3 reacciones ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 asignado ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 asignado ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34128 · 1 asignado ·
Todos los issues de angular/angular-cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
fil-donadoni/tolaria#4409 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
corsairdev/corsair#1764 ·