angular / angular/angular-cli

prevent ng build from overwriting source files

Aperta
#6,485 3 commenti 2 reazioni 0 assegnatari Vedi su GitHub
area: @angular-devkit/build-angular freq1: low severity2: inconvenient type: bug/fix
Lingua principale
TypeScript
Stelle
27k
Fork
11.8k
Merge medio
14h 23m
PR unite (30g)
162

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia da .angular-cli.json e riproduci il comportamento segnalato di ng build --prod usando un outDir di ../../. Traccia il modo in cui Angular CLI gestisce quel percorso di output e definisci un interruttore di sicurezza che impedisca scritture distruttive al di fuori del progetto.

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

Valutazione

Stack tecnologico
angular, typescript
Ambito
build-system, cli
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.