Git Product home page Git Product logo

vue-ts-template's Introduction

vue 项目模板

开发

快速开始

// pnpm install

// pnpm run dev

命名规范

大部分都是用驼峰命名。部分使用首字母驼峰命名法。

  • components 里面使用首字母驼峰命名法。 例如: Navbar
  • pages 里面的变量使用驼峰命名法。例如:badgeHall
  • styles 里面的变量类名使用驼峰命名法。例如:navbarHeight
  • enums 枚举里面的枚举 使用首字母驼峰命名法。例如:RequestEnum
  • types 里面使用首字母驼峰命名法。例如:RetryRequest

分支命名

分支 分支中文 分支英文 使用说明
master 线上分支 master 线上分支
feature 开发分支 feature建分支时间功能说明 功能分支
uat 测试时的分支 uat_建分支时间 测试分支
hotfix 线上紧急修复 bug 的分支 hotfix_建分支时间 紧急修复线上问题的分支,一般是拉 master 分支
release 上线分支 release_建分支时间 一般是已经测试通过只等时间上线

代码提交

  • 类型 [type]
// type 中的类型, 只允许出现以下几种类型
export default [
  'feature', // 新功能(feature)
  'bug', // 此项特别针对bug号,用于向测试反馈bug列表的bug修改情况
  'fix', // 修补bug
  'ui', // 更新 ui
  'docs', // 文档(documentation)
  'style', // 格式(不影响代码运行的变动)
  'perf', // 性能优化
  'release', // 发布
  'deploy', // 部署
  'refactor', // 重构(即不是新增功能,也不是修改bug的代码变动)
  'test', // 增加测试
  'chore', // 构建过程或辅助工具的变动
  'revert', // feat(pencil): add ‘graphiteWidth’ option (撤销之前的commit)
  'merge', // 合并分支, 例如: merge(前端页面): feature-xxxx修改线程地址
  'build' // 打包
];
  • 举例
// git add .

// git commit -m '[type]: 提交信息'

// 例如 git commit -m 'feature: 登录功能开发'

// git push

注意

自动导入 Icon

// 自动导入icon时,不能 按照elmentIcon导入,否则会报警告

// [Vue warn]: Failed to resolve component: Apple If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.

// 错误的
// <el-icon><BottomLeft /></el-icon> // 会出警告

// 正确的
// <el-icon><i-ep-BottomLeft /></el-icon>

Mac 电脑 husky 失效

// chmod +x ./.husky/commit-msg
// chmod +x ./.husky/pre-commit

vue-ts-template's People

Contributors

lanmaom avatar guoweiyanggithub avatar

Watchers

 avatar

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.