项目作者: zh-rocco

项目描述 :
Vue multi application template, optimized from Vue CLI 3 typescript template.
高级语言: Vue
项目地址: git://github.com/zh-rocco/vue-multi-app-typescript.git
创建时间: 2018-08-26T15:59:11Z
项目社区:https://github.com/zh-rocco/vue-multi-app-typescript

开源协议:MIT License

下载


vue-multi-app-typescript

Vue multi application template, optimized from Vue CLI 3 typescript template.

Project setup

  1. yarn install

Compiles and hot-reloads for development

  1. # mobile
  2. yarn run serve-mobile
  3. # pc
  4. yarn run serve-pc

Compiles and minifies for production

  1. # mobile
  2. yarn run build-mobile
  3. # pc
  4. yarn run build-pc

Lints and fixes files

  1. yarn run lint

Add Another App: pad

1. Modify the scripts filed in package.json

  1. "serve-pad": "vue-cli-service serve --mode pad-dev",
  2. "build-pad": "vue-cli-service build --mode pad-prod",
  3. "build": "npm run build-pc && npm run build-mobile && npm run build-pad"

2. Add two .env files in your project root

  • .env.pad-dev:

    1. NODE_ENV=development
    2. VUE_APP_PLATFORM=pad
  • .env.pad-prod:

    1. NODE_ENV=development
    2. VUE_APP_PLATFORM=pad

3. Copy the pc folder and rename it to pad

4. Run

  1. npm run serve-pad
  2. npm run build-pad
  3. npm run build

Code Formatter

Editor is VSCode, and install the following plugins: