NativeScript / NativeScript/nativescript-cli

--includeAngularDemo option does not work.

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

還沒有人認領這個 Issue。

bug
主要語言
JavaScript
星號
1.1k
分支
204
平均合併
1 天 9 小時
30 天內合併 PR
8

描述

Environment

  • CLI: 6.5.0
  • Cross-platform modules: 6.2.3
  • Android Runtime: 6.2.0
  • iOS Runtime: 6.2.0
  • Plugin(s): none

Describe the bug
When tns plugin create, --includeAngularDemo option does not work.

To Reproduce

$ tns plugin create --pluginName=foo --username=bar --includeTypeScriptDemo=y --includeAngularDemo=n ./nativescript-foo

Expected behavior

$ ls ./nativescript-foo/demo-angular
ls: cannot access './nativescript-foo/demo-angular': No such file or directory

But the directory exists.

Sample project
none

Additional context
#4616
https://github.com/NativeScript/nativescript-cli/blob/936cdff0813c4e6074ef1b2f3e5ec144c1070fcf/lib/commands/plugin/create-plugin.ts#L141
At this line, includeDemoOption is "y" or "n" then shouldIncludeDemo is always true.

貢獻指南

開啟貢獻指南

從這裡開始

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

研究方向

從 lib/commands/plugin/create-plugin.ts 的第 141 行附近開始,使用 --includeAngularDemo=n 重現回報的 tns plugin create command。檢查 includeDemoOption 和 shouldIncludeDemo 的解讀方式。完成的定義是:當選項為 n 時,該命令不建立 demo-angular,同時保留對 y 的預期行為。

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

評估

技術堆疊
javascript
領域
cli
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
描述清楚
新手友好度
52/100

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

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