Vue CLI or Native-CLI, what is the recommended way to start a new project?


I’m new to NativeScript. Especially now there’s the new Vue CLI 3, what is the recommended way to generate a new project? What template? Does it matter?


You will have to install both but to start a new project use the starter templates.


I too would like to know the recommended approach here.

For a NativeScript-Vue project should we go the TNS (with great VSCode debugging support) or the Vue CLI route?

Which route is the teams suggested?


Vue is still at early stage, I don’t think you can directly run Vue project with TNS or VSCode it must go through the Vue CLI as TNS won’t know how to compile it.


There sure is confusion here. I have installed both a Vue CLI and the other a TNS based Vue template from here

They are fundamentally different. One uses NPM (Vue CLI) and one uses TNS what I need to know is which is the best option going forward? Also if I use the Vue CLI template do I loose the great debugging support in VSCode?


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


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


As you could read in the docs, if you prefer a complete Vue experience (.vue files, Vue Router, Vuex) which usually a choice for most people from Vue background, then you must go with Vue CLI & NPM commands as TNS won’t understand what those are.

If you go with NativeScript Vue template which is simple JavaScript then TNS would understand that, no need for Vue CLI. Since TNS understands this, VSCode plugin should too.