Ini adalah tutorial, cara menggabungkan Cordova dengan Vue.js dengan menggunakan Vue Material Dashboard.
First, npm install -g cordova
npm install -g vue-cli
cordova create project-name
vue init webpack project-name
Terminal will ask you “Target directory exists. Continue?” because the project directory already exists because it was created in the previous Cordova step. “Yes” will be the right answer.
Write your project name, and then description, author.
Vue build ? Choose Runtime + Compiler
Install vue-router? (Y/n) . Write "Y" and then enter
Use ESLint to lint your code? (Y/n) . Write "n" and then enter
Set up unit tests (Y/n) . Write "n" and then enter. And Choose "Karma and Mocha"
Setup e2e tests with Nightwatch? (Y/n) . Write "n" and then enter
Should we run npm install for you after the project has been created? (recom
mended) (Use arrow keys) . Choose "Yes, use NPM"
Ini adalah tutorial, cara menggabungkan Cordova dengan Vue.js dengan menggunakan Vue Material Dashboard.
First, npm install -g cordova
npm install -g vue-cli
cordova create project-name
vue init webpack project-name
Terminal will ask you “Target directory exists. Continue?” because the project directory already exists because it was created in the previous Cordova step. “Yes” will be the right answer.
Write your project name, and then description, author.
Vue build ? Choose Runtime + Compiler
Install vue-router? (Y/n) . Write "Y" and then enter
Use ESLint to lint your code? (Y/n) . Write "n" and then enter
Set up unit tests (Y/n) . Write "n" and then enter. And Choose "Karma and Mocha"
Setup e2e tests with Nightwatch? (Y/n) . Write "n" and then enter
Should we run
npm install
for you after the project has been created? (recom mended) (Use arrow keys) . Choose "Yes, use NPM"And then wait for minutes.
Open "www/index.html". And change
So open the config/index.js file and change it in this way:
Copy all file vue from vue-material-dashboard in folder src
Move to folder Cordova project in folder src
Open your terminal, and then change directory to your project
npm install
npm audit fix
npm install
cordova platform add android
npm run build
cordova build android
Finish
if you find an error in the font or icon, you add in root index.html:
Referensi :