Allow failing build if there are missing runtime assets
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- angular, typescript
- 領域
- build-system
調査の方向性
angular.json の assets 設定から始め、@angular/cli の build が glob ベースの assets エントリをどのように処理するかを追跡します。要求された files 配列の動作を、代替の failIfNoMatch オプションと比較します。完了条件は、必要な runtime assets が不足している場合に build が失敗し、既存の glob の使用は引き続きサポートされることです。
索引モデルが issue の本文から書いたものです。
説明
🚀 feature request
Relevant Package
This feature request is for @angular/cli
Description
If you have in the assets configuration in angular.json:
"assets": [
...
{
"glob": "jquery.min.js",
"input": "./node_modules/jquery/dist",
"output": "/assets/jquery"
},
...
]
And the glob doesn't match anything, no error is generated. This means the build can be broken because the assets folder doesn't contain all required runtime assets, but we won't realize until runtime.
Describe the solution you'd like
The feature request is to add an array field files that can be used instead of glob to tell exactly which files to copy: `"files":
"assets": [
...
{
"files": ["jquery.min.js", "jquery.min.map"],
"input": "./node_modules/jquery/dist",
"output": "/assets/jquery"
},
...
]
Describe alternatives you've considered
I considered listing the jquery.min.js file in the scripts section of angular.json, but this solution doesn't work perfectly for cases when it's not a "js" file I want in the assets folder. For example, mapbox comes with a folder with images, that I need copied to the assets folder.
An alternatively feature implementation I considered recommending was you could add an option failIfNoMatch to make the build fail if the glob doesn't match anything: "failIfNoMatch": true. But this solution is not as useful as the files one though, as the glob jquery.min.{js,map} would succeed even if it finds only one of the required files.
- 主要言語
- TypeScript
- スター
- 27k
- フォーク
- 11.8k
- 平均マージ
- 16時間 35分
- マージ済み PR(30日)
- 176
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
angular/angular-cli のほかの issue
-
area: @angular/build gemini-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
angular/angular-cli#33055 · コメント 1 件 · リアクション 3 件 ·
-
area: @angular/build gemini-triaged
難易度 4/5 3〜5日 初心者へのやさしさ 72/100
angular/angular-cli#34137 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 担当者 1 名 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 担当者 1 名 ·
angular/angular-cli の issue をすべて見る
似ている issue
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
supermomonga/zcode-acp#24 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
growthbook/growthbook#7100 ·
-
triage
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100