angular / angular/angular-cli

prevent ng build from overwriting source files

オープン
#6,485 コメント 3 件 リアクション 2 件 担当者 0 名 GitHub で見る
area: @angular-devkit/build-angular freq1: low severity2: inconvenient type: bug/fix
主要言語
TypeScript
スター
27k
フォーク
11.8k
平均マージ
14時間 23分
マージ済み PR(30日)
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 を短くまとめたダイジェスト。