https://github.com/nativescript-vue/vue-cli-template
A Vue-CLI (2.x) template for NativeScript-Vue
https://github.com/nativescript-vue/vue-cli-template
Last synced: 12 months ago
JSON representation
A Vue-CLI (2.x) template for NativeScript-Vue
- Host: GitHub
- URL: https://github.com/nativescript-vue/vue-cli-template
- Owner: nativescript-vue
- License: mit
- Archived: true
- Created: 2018-02-26T12:27:46.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-05T17:42:22.000Z (over 3 years ago)
- Last Synced: 2024-07-26T11:42:42.184Z (almost 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 3.97 MB
- Stars: 283
- Watchers: 22
- Forks: 50
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nativescript-vue - A Vue-CLI (2.x) template with `.vue` file support.
README
# Deprecated :warning:
This template has been deprecated in favor of using the `ns create` command:
```bash
ns create myAwesomeApp --vue # add --ts if you'd like to scaffold a project with TypeScript
cd myAwesomeApp
ns run ios|android
```
---
> **Note:** This is a new version of the template for NativeScript 7, if you are looking for the old template, it is available on the [ns6 branch](https://github.com/nativescript-vue/vue-cli-template/tree/ns6).
# vue-cli-template
> NativeScript-Vue application template for quick prototyping with vue-cli (2.x).
## Usage
This is a project template for [vue-cli](https://github.com/vuejs/vue-cli/tree/master).
``` bash
# Scaffold project
npm install -g @vue/cli @vue/cli-init
vue init nativescript-vue/vue-cli-template
cd
# Install dependencies
npm install
# Build
ns build
# Preview the application on a device
ns preview
# Build, watch for changes and run the application
ns run
# Clean the NativeScript application instance
ns platform remove
# Hot Module Replacement (HMR) disabled Debugging session
ns debug --no-hmr
```
Yarn usage
``` bash
# Scaffold project
yarn global add @vue/cli @vue/cli-init
vue init nativescript-vue/vue-cli-template
cd
# Install dependencies
yarn
```
### Debugging vs Production
During usual run, project runs with following settings -
1. Code is **not** minified
2. Vue.config.silent is false, so every component creation is logged
```bash
# Build, watch for changes and debug the application
ns debug
```
To minify code, and prevent Vue logs -
```bash
# Build for production
ns build --env.production
# Run as production
ns run --env.production
```
## Using NativeScript plugins
Installing plugins is the same as official NativeScript [documentation](https://docs.nativescript.org/plugins/plugins#installing-plugins).
Use `ns plugin add` from the root of the project directory.
```shell
ns plugin add
```