angular / angular/angular-cli

prevent ng build from overwriting source files

Ouverte
#6,485 3 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
area: @angular-devkit/build-angular freq1: low severity2: inconvenient type: bug/fix
Langage dominant
TypeScript
Étoiles
27k
Forks
11.8k
Merge moyen
14 h 23 min
PR mergées (30 j)
162

Description

Okay, that one was scarry as hell. I am sooo lucky I pushed my project to GH before building ng sources prepared for prod....

What I did was opening .angular-cli.json and setting
"outDir": "../../",

as I wanted to store built files next to my project so that I could simply exclude project in gradle. Turns out that was a terrible mistake as ng build --prod decided to nuked my whole UI project for good. Yes sir it did. 10 days of work have been completely vanished from my harddrive. Good thing is that I did push it all to git before...

I would strongly suggest to add safety switches preventing self-destruction in the whole ng-cli project.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par .angular-cli.json et reproduisez le comportement signalé de ng build --prod en utilisant un outDir de ../../. Suivez la manière dont Angular CLI gère ce chemin de sortie et définissez un mécanisme de sécurité qui empêche les écritures destructrices en dehors du projet.

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

Évaluation

Stack technique
angular, typescript
Domaine
build-system, cli
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

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