tralves / nativescript-vue-rollup-template

A NativeScript template ready to roll with Vue.js and .vue files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DEPRECATED

We are deprecating this template in favor of the webpack one. Some things may have changed and I haven't tested this template in a while.

Check the Groceries Vue app for an example of a working app using the webpack template.

NativeScript Vue.js Template

This repo serves as the starting point for NativeScript + Vue.js projects, using nativescript-vue.

This template creates a project ready to use with Vue single file components* (.vue files)!

It creates a project with the structure:

my-app
 |
 |-app   # your app code
 |  |-components
 |  |-...
 |
 |-tns   # the generated tns project
 |  |-app
 |  |-...
 |...

This template supports:

  • .vue Single-File Components;
  • scss imports and inside <style> tags in .vue files;
  • root imports (imports starting with / refer to the root of the app folder);
  • babel with es2015 and stage-2 presets;

Usage

  1. Dependencies:
  1. Create app from this template
tns create hello-ns-vue --template nativescript-vue-rollup-template

cd hello-ns-vue
  1. Watch for changes while developing

In two separate terminals run:

# terminal 1
rollup -c -w

# terminal 2
cd tns
tns run android
# or
tns run ios
  1. Code! Check Groceries Vue to see this template in action in a complete app.

About

A NativeScript template ready to roll with Vue.js and .vue files.


Languages

Language:JavaScript 68.8%Language:Vue 26.3%Language:CSS 4.9%