kartsims / vue-cordova

Vue.js plugin for Cordova
http://kartsims.github.io/vue-cordova
328 stars 71 forks source link

Add description/documentation "how to setup cordova with vue" #23

Closed BennyAlex closed 7 years ago

BennyAlex commented 7 years ago

@kartsims Hello, Neither in the readme nor in the docs are any informations about 'how to setup the project to use and build the app with cordova'. Maybe you can add some informations? Because it is a tricky to get cordova working with webpack/vue-loader correctly...

kartsims commented 7 years ago

Doesn't the vue-cordova-demo repo provide a sufficient use case ?

Please send any suggestions ! What kind of information would you have liked to have in the readme or the docs ?

BennyAlex commented 7 years ago

@kartsims Edit: Sorry I didn't saw that vue-cordova-demo already includes cordova because I got the error Current working directory is not a Cordova-based project and so I thought it is just a vue-app which shows the usage of vue-cordova.

The vue-cordova-demo is nice, but the problem is that you have to clone it and then change some things to get a working vue & cordova project. The vue-cordova plugin itself dosn't describe how to implement and setup vue correctly. For example I don't know how to configurate vue-loader that it will transform .vue singlefile compomonents, which are used by cordova then.

So what I want to say is that the demo does't show how to create a new project with cordova and then install vue and vue-loader and setup them correctly. I know vue-cordova is mainly a wrapper for some functions/plugins but it would be nice to see a full desciption how to setup an entire project. Or maybe you can provide a vuejs template so vue init cordova-example myproject would create a new customizable vue&cordova project.

kartsims commented 7 years ago

You're right that would be great unfortunately I don't have time to maintain a vuejs template...

Also vue-loader is specific to webpack. It is not related to vue-cordova that can be used by itself (in a plain Vue.js environment without module bundler) so I guess you could use a generic tutorial on how to implement vue-loader in a vue app, and then add vue-cordova as a new layer to your "stack"