# vue_template **Repository Path**: gongyz/vue_template ## Basic Information - **Project Name**: vue_template - **Description**: vue项目模块,用于快速搭建个人、公司项目 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-03-29 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## vue项目模板 ## git 配置 ```bash # 统一使用LF作为结尾标识符 git config --global core.autocrlf false ``` ## 统一使用[Yarn](https://yarnpkg.com/en/docs/cli/)包管理工具 ```bash # 安装 npm install yarn -g # 设置镜像 yarn config set registry https://registry.npm.taobao.org --global yarn config set disturl https://npm.taobao.org/dist --global ``` ## node-sass 安装失败 安装依赖的过程中可能会遇到 node-sass 安装失败问题 ```bash # 第一步 配置 node-sass 的二进制包镜像地址: yarn config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ # 第二步 重新安装 node-sass 依赖 yarn add node-sass@xxx -D ``` ## 编译主题 ```bash # 修改 element-variables.scss 文件后执行下面的命令 # 例如修改主题色为红色 $--color-primary: red ./node_modules/.bin/et ``` ## 运行项目 ``` bash # 安装项目依赖 yarn # 运行项目 yarn run dev # 打包部署 yarn run build ``` ## 发版说明 - 发版时先修改utils/constant.js中 version = 1.0.0(00) 变量 - 括号内为小版本号,完成某次迭代开发或者优化后,每发一次测试版本,数字加 1,通过测试验收后,括号内小版本回到 00 - 括号外为大版本,通过测试验收,发布正式版本时,根据此次迭代的改动量确定版本号,如:优化 1.0.1;新功能迭代:1.1.0 - 发布测试环境:yarn run release - 发布生产环境:yarn run prod ## 分支说明 - master 用于发生产 - develop 开发分支 - 若要执行任务或是修复 bug, 我们从 develop 拉取一个分支来编写我们的代码,若执行完成再合并至 develop 分支 ## 结合 DOClever Mock 数据开发 http://localhost:8090 是前端项目的地址 http://192.168.2.244:9026/mock/5cf22deff8a8e955c2cb2624 这个是 mock server 的地址 5cf22deff8a8e955c2cb2624 是我们项目在 DOClever 中的项目 ID 如果在 DOClever 中接口状态处于“开发中”,就走 http://192.168.2.244:9026/mock/5cf22deff8a8e955c2cb2624 这个mock地址 如果是“开发完成”,就走我们真实的地址,因为 http://localhost:8090 我们在项目里代理了真实地址所以可以直接写。 net.js 放在 mock 目录下 node net.js http://192.168.2.244:9026/mock/5df03ab5d20847152e3ef0e7 http://localhost:8090 ## Git 提交规范 使用当前较为主流的 [AngularJS 的 commit 规范](https://gist.github.com/stephenparish/9941e89d80e2bc58a153) 每次提交,Commit message 都包括三个部分:Header,Body 和 Footer ``` (): // 空一行 // 空一行