Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.

Latest commit

 

History

History
96 lines (67 loc) · 1.59 KB

File metadata and controls

96 lines (67 loc) · 1.59 KB

generator-vue-impression

Vue + Vuex + Vue Router + Vue Impression + Webpack 3

Installation

First, install Yeoman and generator-vue-impression:

yarn global add yo generator-vue-impression

Then generate your new project:

yo vue-impression

OR upgrade existed project:

cd YOUR_PROJECT_FOLDER
yo vue-impression --upgrade

Development

First, run following command in your project folder:

yarn start

Then, open your browser with http://localhost:8080.

Deploy

First, add your Qiniu key to package.json:

{
  "deploy": {
    "ACCESS_KEY": "",
    "SECRET_KEY": ""
  }
}

Then run following command to release patch version:

npm version patch -m 'Release version %s'

OR release minor version:

npm version minor -m 'Release version %s'

Best Practice

  • Proxy API request

    First, update proxy table in package.json. For example:

    {
      "proxy": {
        "/api": {
          "target": "http://localhost:3000",
          "changeOrigin": true
        }
      }
    }

    Then restart development server:

    yarn start
  • Folloing standard of style-guide

  • Divide store by using Vuex#Module

  • Update nested state by using Ramda#assocPath

  • Write styles with CSS Modules

License

MIT