angular / angular/angular-cli

prevent ng build from overwriting source files

未關閉
#6,485 3 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視
area: @angular-devkit/build-angular freq1: low severity2: inconvenient type: bug/fix
主要語言
TypeScript
星號
27k
分支
11.8k
平均合併
14 小時 23 分鐘
30 天內合併 PR
162

描述

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.

貢獻指南

開啟貢獻指南

研究方向

從 .angular-cli.json 開始,使用 ../../ 作為 outDir,重現回報的 ng build --prod 行為。追蹤 Angular CLI 如何處理該輸出路徑,並定義一個安全開關,以防止在專案外進行破壞性寫入。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
angular, typescript
領域
build-system, cli
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。