Giter Club home page Giter Club logo

generator-vue-impression's Introduction

generator-vue-impression

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

English Version

安装

首先, 安装Yeomangenerator-vue-impression:

yarn global add yo generator-vue-impression

然后创建新项目:

yo vue-impression

或者升级旧项目:

cd YOUR_PROJECT_FOLDER
yo vue-impression --upgrade

开发

首先, 进入项目目录并执行如下命令:

yarn start

然后, 打开浏览器并访问 http://localhost:8080

发版

首先, 在package.json文件中修改七牛云配置并加入密钥:

{
  "deploy": {
    "DOMAIN": "fe.imdada.cn",
    "BUCKET": "dada-fe",
    "ACCESS_KEY": "",
    "SECRET_KEY": ""
  }
}

然后执行如下命令之一:

# 小版本更新,如修复问题
npm version patch -m 'Release version %s'

# 大版本更新,如增加功能
npm version minor -m 'Release version %s'

# 手动指定版本号,如1.0.0
npm version 1.0.0 -m 'Release version %s'

# 测试版本
yarn debug

最佳实践

  • 代码格式化

    如需格式化代码,执行yarn format命令

  • 转发 API 请求

    首先, 更新package.json文件中的配置,比如:

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

    然后,重启服务:

    yarn start
  • 遵守style-guide规范

  • 使用Vuex#Module拆分 store

  • 使用Ramda#assocPath更新嵌套数据

  • 使用CSS Modules创建模块化样式

License

MIT

generator-vue-impression's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

zhangshme

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.