This extension allows you to add NativeScript files with snippets included to your VS Code project.
Inspired by https://github.com/sebastianbaar/vscode-add-angular-files.
Right click on a file or a folder in your current project. There are two options added to the context menu Add Page
and Add Component
:
This command adds the following files to your folder (let's assume you typed home
):
home-page.ts
home-page.xml
home-page.css
home-view-model.ts
This command adds the following files to your folder (let's assume you typed clock
):
clock-component.ts
clock-component.xml
clock-component.css
The naming of the files as well as the snippets are based on the official Hello World typescript template
- Install Visual Studio Code 1.12.0 or higher
- Launch Code
- From the command palette
Ctrl
-Shift
-P
(Windows, Linux) orCmd
-Shift
-P
/fn
-F1
(OSX) - Select
Install Extension
- Type
add nativescript files
and press enter - Select the extension from the list and click
Install
- Reload Visual Studio Code
Important: This extension due to the nature of it's purpose will create files on your hard drive. While it should not override any files during this process, I'm not giving any guarantees or take any responsibility in case of lost data.
MIT