You are reading docs for v1.3.1, click here for the latest version.
Templates

This page provides an overview of the templates that you can use to develop apps with NativeScript-Vue. The list is updated as new templates come up or old templates become deprecated.

NOTE: To use any of the listed templates, you need to set your system up for NativeScript development.

Currently supported templates:

Deprecated templates:

nativescript-vue/vue-cli-template

Project link: https://github.com/nativescript-vue/vue-cli-template

Features

  • .vue single file components
  • Vuex—state management (opt-in)
  • Vue Router—routing (opt-in)—experimental
  • NativeScript themes

Use this template to develop your app from the Vue CLI and design it around .vue file components. Out-of-the-box, the template also provides advanced Vue functionality (Vuex and Vue Router) and support for NativeScript themes.

Functionality-wise, the template is a spin-off of the basic template for NativeScript development and implements a simple button-controlled counter.

Originally built by Pascal Martineau, this template is now officially supported for NativeScript-Vue.

Usage

$ npm install -g @vue/cli @vue/cli-init
$ vue init nativescript-vue/vue-cli-template#legacy <project-name>
$ cd <project-name>
$ npm install
$ npm run watch:android
$ # or
$ npm run watch:ios

nativescript-vue/nativescript-vue-template

Project link: https://github.com/nativescript-vue/nativescript-vue-template

Features

  • Pure JavaScript—no .vue files
  • NativeScript themes

Use this template to develop your app from the NativeScript CLI, using only JavaScript.

Functionality-wise, the template is a spin-off of the basic template for NativeScript development and implements a simple button-controlled counter.

Usage

$ tns create <project-name> --template nativescript-vue-template
$ cd <project-name>
$ tns run android
$ # or
$ tns run ios
Contributors