Introduce "add-type-to-class-name" option to Ng Generate Application and Ng New

オープン
#31,582 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
angular, typescript
領域
cli, tooling

調査の方向性

issue に記載されている ng new と ng generate application コマンドのエントリポイント、および angular.json の schematics 設定から始めてください。アプリケーションのオプションがどのように適用されるかを追跡し、その後、要求されたオプションで将来のコンポーネント、サービス、ディレクティブの生成に対して addTypeToClassName を設定できることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

area: @schematics/angular feature feature: insufficient votes
Command

new, generate

Description

To enhance Angular CLI so that developer can control whether the app component generated during ng new or ng generate application will have the Type appended to its class name (i.e AppComponent) or not.

In addition, to allow developer to set a default angular.json's schematics "addTypeToClassName" to true via command line, so that future creation of component (include service and directive) via CLI will by default include the type inside the classname.

Describe the solution you'd like
  1. introduce add-type-to-class-name option to Ng Generate Application and Ng New, OR
  2. rename the "file-name-style-guide" option to "style-guide", with 4 possible values
    addTypeToClassNameOnly, addTypeToFileNameOnly, addTypeToFileAndClassName, 2025

Doing so, will set the addTypeToClassName to true inside the angular.json for component, service and directive

Describe alternatives you've considered

Currently, developer has to manually change the class name for the App Component to include the Type

主要言語
TypeScript
スター
27k
フォーク
11.8k
平均マージ
16時間 35分
マージ済み PR(30日)
176

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

angular/angular-cli のほかの issue

angular/angular-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。