/vue-cli-template

Vue+Vuex+Vue-resource+Webpack 用于快速开始项目

Primary LanguageJavaScript

vue-cli-template

A Vue.js project

JavaScript Style Guide

Build Setup

# install dependencies
npm install

# 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

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

目录结构

├── build                      // 构建相关
├── config                     // 配置相关
├── src                        // 源代码
│   ├── api                    // 所有请求 按业务模块划分子文件(根据业务模块来划分views,并且将views 和 api 两个模块一一对应)
│   ├── assets                 // 主题 字体等静态资源
│   ├── components             // 全局公用组件
│   ├── directive              // 全局指令
│   ├── filters                // 全局filter
│   ├── mock                   // mock数据
│   ├── router                 // 路由
│   ├── store                  // 全局store管理(管理全局性的数据、状态)
│   ├── styles                 // 全局样式 (暂时不放外面)
│   ├── utils                  // 全局公用方法
│   ├── view                   // view 按业务模块划分子目录 (根据业务模块来划分views,并且将views 和 api 两个模块一一对应)
│   ├── App.vue                // 入口页面
│   └── main.js                // 入口 加载组件 初始化等
├── static                     // 第三方不打包资源
│   ├── jquery
│   └── Tinymce                // 富文本
├── .babelrc                   // babel-loader 配置
├── eslintrc.js                // eslint 配置项
├── .gitignore                 // git 忽略项
├── favicon.ico                // favicon图标
├── index.html                 // html模板
└── package.json               // package.json
  1. TODO

    1. analyzer 分析配置命令
    2. axios 封装,处理token 等拦截器功能
    3. nginx 反向代理处理跨域
    4. mock server
    5. eslint 补充rules
    6. 每个post要加loading和延迟,get暂时不加