当前位置: 首页 > news >正文

网络网站建设电话推销关键词优化公司

网络网站建设电话推销,关键词优化公司,网站建设的域名,网站可以做软著吗一、背景 Git - githooks Documentation https://github.com/typicode/husky#readme gitHooks: commit-msg_snowli的博客-CSDN博客 之前实践过这个配置,本文在vue3 ts 的项目中,再记录一次。 二、使用 2.1、安装 2.1.1、安装husky pnpm add hus…

一、背景

Git - githooks Documentation

https://github.com/typicode/husky#readme

gitHooks: commit-msg_snow@li的博客-CSDN博客

之前实践过这个配置,本文在vue3 + ts 的项目中,再记录一次。

二、使用

2.1、安装

2.1.1、安装husky

pnpm add husky

2.1.2、package.json

"scripts": {"prepare": "husky install",
}

 2.1.3、pnpm run prepare

pnpm run prepare

执行后:

2.2、初始化husky 

npx husky install .husky

执行后: 

2.3、package.json

"gitHooks": {"pre-commit": "lint-staged","commit-msg": "node scripts/verify-commit-msg.js"}

2.4、安装chalk,vue3+ts使用4.X版本 

pnpm add chalk@4.1.2

2.5、/scripts/verify-commit-msg.js

import chalk from 'chalk'; // 控制台日志标注样式
import fs from 'fs';
const msgPath = process.env.GIT_PARAMS || '.git/COMMIT_EDITMSG' // 读取到保存 git commit 时输入的描述信息的文件目录,一般路径如下:.git/COMMIT_EDITMSG
const msg = fs.readFileSync(msgPath, 'utf-8').trim()const commitRE =/^(revert: )?(wip|release|feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types|build)(\(.+\))?: .{1,50}/if (!commitRE.test(msg)) {console.log()console.error(`  ${chalk.bgRed.white(' ERROR ')} ${chalk.red(`invalid commit message format.`)}\n\n` +chalk.red(`  Proper commit message format is required for automated changelog generation. Examples:\n\n`) +`    ${chalk.green(`feat(compiler): add 'comments' option`)}\n` +`    ${chalk.green(`fix(v-model): handle events on blur (close #28)`)}\n\n` +chalk.red(`  See .github/COMMIT_CONVENTION.md for more details.\n`))process.exit(1)
}

2.6、添加一个commit msg钩子

npx husky add .husky/commit-msg "node scripts/verify-commit-msg.js"

2.7、测试提交

不规范示例:

规范示例:

经测试提交成功。

过程记录:

记录一、

 ReferenceError require is not defined in ES module scope, you can use import instead_绘绘~的博客-CSDN博客

记录二、

const msgPath = process.env.GIT_PARAMS

const msgPath = process.env.GIT_PARAMS || '.git/COMMIT_EDITMSG'

GIT_PARAMS没有读到目录,本文使用静态目录,待后续研究。

记录三、

引入chalk、fs需要使用import,使用require报错

记录四、 git 钩子

Git - githooks Documentation

参考链接:

Git钩子 GitHook - 简书

husky的使用 - 简书

VUE 3.0 源码 scripts/verifyCommit.js 文件 对git提交时输入的描述信息进行规范_git_params_老罗-laoluo的博客-CSDN博客

ReferenceError require is not defined in ES module scope, you can use import instead_绘绘~的博客-CSDN博客

Vue3项目工程化配置:Prettier + Eslint + husky + commitlint - 点击领取

vite vue3 规范化与Git Hooks详解_vue.js_脚本之家

https://www.cnblogs.com/heyhaiyang/p/15256588.html

前端工程规范化-eslint、stylelint、prettier、git hooks_51CTO博客_前端模块化规范

【Vue3】标准化大厂编程规范解决方案之ESLint + Git Hooks_51CTO博客_vue3 生产

Git commit 消息的格式与约定式提交_哔哩哔哩_bilibili

vite vue3 规范化与Git Hooks

Vue3 + Vite 前端工程化-基础篇 - 知乎

http://www.ds6.com.cn/news/14254.html

相关文章:

  • 响应式网站优势谷歌搜索引擎入口google
  • 网站优化建设网站销售怎么推广
  • h5做的公司网站营销软文的范文
  • 怎么查网站有没有做404韩国电视剧
  • 如何在微信内做网站网站页面分析作业
  • 网站维护中页面设计搜索引擎优化指南
  • 企业网站建设须知怎样做竞价推广
  • 佛山外贸网站建设平台优化工具箱
  • 网站开发可行性分析报告关键词搜索挖掘爱网站
  • 新津网站建设网站开发外包
  • 网站开发语言汇总百度推广和百度竞价有什么区别
  • 沧州市做网站的宁波seo关键词优化报价
  • 网站开发怎么做seo公司广州
  • 买高端品牌网站建设想做个网络推广
  • 智能网站搭建平台免费网站alexa排名查询
  • 网页设计音乐网站徐州做网站的公司
  • 通辽公司做网站百度广告推广费用年费
  • 微信如何自己开发小程序天津优化网络公司的建议
  • b2b网站模块营销渠道的三个类型
  • 靖江有帮助做苏宁易购网站的公司吗怎样做推广是免费的
  • google怎么做网站推广百度推广手机app下载
  • 兰州易天网站建设公司有哪些天津seo公司
  • 继续好商会网站建设如何自己开发一个平台
  • 苏州画廊网站建设网站推荐
  • 嘉兴制作网站百度在线客服系统
  • 做网站需要注意的事项网络营销ppt课件
  • 自己建设网站平台步骤邯郸seo优化
  • 自助网站建设系统软件网络广告设计
  • 国际国内新闻最新消息今天沈阳百度推广排名优化
  • 做网站送推广郑州竞价托管代运营