Skip to content

h5-coder/vue-template-pc

Repository files navigation

项目

Vue模板,用于作为PC项目的基础配置项目。

开发说明

Build Setup

# install dependencies
npm install

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

# build for production with minification
npm run build

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

开发环境端口

webpack配置文件index.js中的dev.port,默认值为8081;

技术栈、依赖库

见:package.json 中的dependencies新增依赖需要跟负责人确认之后,才可安装

项目开发要求

  • 提交代码前,必须保证符合ESLint代码规范

Eslint

Eslint开关

config/index.jsconfig.dev.useEslint的值

  • true为开启Eslint代码检查
  • false为关闭Eslint代码检查

规则

见:.eslintrc.js

Mock

Mock开关

config/dev.env.jsconfig/prod.env.jsprocess.env.MOCK的值

  • true为开启Mock
  • false为关闭Mock

Mock官网、api

http://mockjs.com/

版本

  • 2.0.2
    1. vue: "^2.6.10" => "^2.6.11"
    2. vue-template-compiler: "^2.6.10" => "^2.6.11"
    3. 添加@babel/runtime插件
    4. 添加babel/runtime-corejs2插件
    5. uglifyjs-webpack-plugin: "^2.2.0" => "^1.0.0-rc.0",解决打包后报错问题

参考文献

vue,react 配置 commitlint 和 eslint 钩子 webpack+vue+Eslint+husky+lint-staged 统一项目编码规范 升级到Babel 7

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages