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 摘要。