Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Add new "common" schematic to share configurations for all schematics at once

未關閉
#33,221 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
typescript
領域
cli

研究方向

從 generate 命令和 schematic 設定解析路徑開始。比較提議的共用設定與目前按 artifact 區分的設定,然後定義共用值的套用方式,以及 artifact 直接指定的值如何覆寫共用值。當 schematics 可以繼承共用的預設值,同時保留按 artifact 的覆寫時,即視為完成。

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

描述

area: @angular-devkit/schematics gemini-triaged
Command

generate

Description

Implement an internal artifact to commonize the configuration of schematics so that all schematics can share a common configuration by default, and override on a per-artifact basis if needed. Currently, all configurations are duplicated, and while not that annoying to deal with for a single collection, it can quickly add up when using several collections.

Describe the solution you'd like

Actual :

{
  "schematics": {
    "@schematics/angular:component": { "skipSelector": true },
    "@schematics/angular:directive": { "skipSelector": true },
    "@schematics/angular:pipe": { "skipSelector": true }
  }
}

Proposed :

{
  "schematics": {
    "@schematics/angular:common": { "skipSelector": true }
  }
}

This new common schematic would contain either

  • only fields that are common to all artifacts
  • All fields possible, even if not applicable to certain artifacts

Resolving would follow this pattern :

  • Look for common artifact schematic value
  • If existing, apply value
    • If all fields are possible : also check if value is applicable to artifact
  • Look for direct artifact schematic value
  • Override value
Describe alternatives you've considered

Doing it by hand as already done today is the only solution

主要語言
TypeScript
星號
27k
分支
11.8k
平均合併
17 小時 25 分鐘
30 天內合併 PR
183

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

angular/angular-cli 的其他 Issue

查看 angular/angular-cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

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

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