ionic-team / ionic-team/ionic-cli
Feature request: Add capability to remove components
還沒有人認領這個 Issue。
- 主要語言
- TypeScript
- 星號
- 2k
- 分支
- 681
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Currently the CLI provides us with the capability to generate components using the generate command. Assume that we need to generate a page, we use the ionic generate page games-list. This will generate a directory which contains a .html, .ts and .scss file for us and add an entry within the declarations and entryComponents array in the app's root module: app.module.ts.
Now for some reason if we want to delete the games-list component we will have to manually delete the folder and remove the entries in the app.module.ts. In many situations the developer may forget to do the second step i.e. to remove the entries from app.module.ts which results in an error.
PS: I have faced this error many times in the initial stages of development. I keep forgetting to remove the entries.
In order to avoid this error, we can introduce remove command which removes the component folder as well the entries from the app's root module.
ionic remove page games-list
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先追蹤 CLI 現有的 generate 命令,以及它如何更新 app.module.ts。為 games-list 這類產生的頁面定義 remove 命令,涵蓋其目錄以及 declarations 和 entryComponents 項目,然後驗證產生的模組仍然有效。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- typescript
- 領域
- cli
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100