NativeScript / NativeScript/nativescript-cli

CLI command to generate new views

Open
#2,606 6 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This is an existing, but for some reason cancelled issue over here
https://github.com/NativeScript/nativescript-cli/issues/905

I groan every time I need to add a new view... it would be endlessly helpful to
"tns view add mypage" and have it generate the basic subs for a page, like the xml with the already in there, the ts\js (with navto wired, maybe a model) , css... all stubbed in

  • tns view add mypage
  • tns view add mypage --ts
  • tns view add mypage --model myModel

Or whatever...

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 by reviewing the linked cancelled issue #905 and the proposed tns view add command forms. Define the command's supported options before locating the CLI entry points. Done should mean generating the requested XML, TypeScript or JavaScript, and CSS stubs, with optional model and navigation wiring.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.