prevent ng build from overwriting source files
- 主要语言
- 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