A Vue-CLI-Based Cross-Platform Boilerplate

What's it

Set Up

vue init scris/linx.vuetemplate my-project-name
cd app
cordova platform add ios
cordova platform add android
cordova platform add browser


Now it is time to build your webapp.

Just use it like using vue-cli. (with vue-router and element-ui)

You will find it easy to use.

Emm ... One thing left. You can use process.env.LINX_AGENT to get which mode is user currently using. if you get electron , do things in standalone devices. if you get cordova, do things in mobile phones. if you get other answer or get nothing, mark it as in the web environment.

If you wanna make some changes for electron, go to see dist/electron.js as the main part and dist/renderer.electron.js as the renderer part.


# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

# run unit tests
npm run unit

# run e2e tests
npm run e2e

# run all tests
npm test

# build for Cordova (Browser)
npm run cbrowser

# build for iOS
npm run cios

# build for Android
npm run candroid

# run Electron tests
npm run edev

# build for Mac X64
npm run emac

# build for Windows X64
npm run ewin

# build for Linux X64
npm run elinux