Cordova+vue Project Initialization __cordova

Source: Internet
Author: User

1. Generate Cordova Project
See http://cordova.apache.org specifically

Global install Cordova
$ npm install-g Cordova

Create a project named MYAPP
$ cordova Create MyApp

The following diagram of the build directory:

2. Create a Vue project in the MyApp project
See https://cn.vuejs.org/v2/guide/installation.html specifically

Global Install VUE-CLI
$ npm Install--global vue-cli

Create a new project based on the Webpack template

$ vue init webpack MyApp (name can be the same as the project above)

To create a good catalog, see the following:

$ MyApp

$ npm Install

$ npm Run dev

3. Modify Vue Project Config/index.js file

4. To build the Vue project, after compiling and packaging generated code automatically run to the main directory under the WWW file
CD to Vue's MyApp directory, perform the NPM run build

5. Compile various platforms for Cordova
CD to the home directory, perform Cordova build IOS, Cordova build Android, and more.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.