NativeScript / NativeScript/nativescript-cli

--includeAngularDemo option does not work.

Open
#5,297 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
1.1k
Forks
204
Avg merge
1d 9h
Merged PRs (30d)
8

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/commands/plugin/create-plugin.ts around line 141 and reproduce the reported tns plugin create command with --includeAngularDemo=n. Inspect how includeDemoOption and shouldIncludeDemo are interpreted. Done means the command does not create demo-angular when the option is n, while preserving the expected behavior for y.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.