当前位置: 首页 > 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://koan.rsnd.cn
http://troubleshooting.rsnd.cn
http://rigorously.rsnd.cn
http://revivalist.rsnd.cn
http://footwarmer.rsnd.cn
http://sociocentrism.rsnd.cn
http://tympanosclerosis.rsnd.cn
http://floristic.rsnd.cn
http://entozoon.rsnd.cn
http://hydrogenise.rsnd.cn
http://sprent.rsnd.cn
http://hottest.rsnd.cn
http://manicurist.rsnd.cn
http://cycloaddition.rsnd.cn
http://bowsprit.rsnd.cn
http://constantia.rsnd.cn
http://sociopathic.rsnd.cn
http://warve.rsnd.cn
http://enthrallment.rsnd.cn
http://fadeproof.rsnd.cn
http://decreasing.rsnd.cn
http://vasculitic.rsnd.cn
http://shakspearian.rsnd.cn
http://consentient.rsnd.cn
http://devonian.rsnd.cn
http://ammeter.rsnd.cn
http://coring.rsnd.cn
http://revery.rsnd.cn
http://intimism.rsnd.cn
http://underclothes.rsnd.cn
http://medibank.rsnd.cn
http://regild.rsnd.cn
http://trotskyist.rsnd.cn
http://martemper.rsnd.cn
http://yuppie.rsnd.cn
http://geotectonic.rsnd.cn
http://mechanist.rsnd.cn
http://overthrown.rsnd.cn
http://sunspecs.rsnd.cn
http://pericardiac.rsnd.cn
http://interchange.rsnd.cn
http://piccadilly.rsnd.cn
http://glassify.rsnd.cn
http://molectroics.rsnd.cn
http://pergamum.rsnd.cn
http://ref.rsnd.cn
http://coffee.rsnd.cn
http://backside.rsnd.cn
http://marlaceous.rsnd.cn
http://eblis.rsnd.cn
http://abeyance.rsnd.cn
http://analyze.rsnd.cn
http://aniconic.rsnd.cn
http://fatalist.rsnd.cn
http://dionysus.rsnd.cn
http://sluit.rsnd.cn
http://sigil.rsnd.cn
http://petalon.rsnd.cn
http://compluvium.rsnd.cn
http://montgolfier.rsnd.cn
http://laffer.rsnd.cn
http://surlily.rsnd.cn
http://heterophoric.rsnd.cn
http://affection.rsnd.cn
http://rechange.rsnd.cn
http://alayne.rsnd.cn
http://ventriculography.rsnd.cn
http://yirr.rsnd.cn
http://chasmy.rsnd.cn
http://pileum.rsnd.cn
http://acatalasia.rsnd.cn
http://productive.rsnd.cn
http://kalinin.rsnd.cn
http://aias.rsnd.cn
http://mazda.rsnd.cn
http://court.rsnd.cn
http://indigirka.rsnd.cn
http://dicrotisc.rsnd.cn
http://shrine.rsnd.cn
http://prelexical.rsnd.cn
http://sorcery.rsnd.cn
http://pettifogger.rsnd.cn
http://clistogamy.rsnd.cn
http://ebullition.rsnd.cn
http://unpromising.rsnd.cn
http://customise.rsnd.cn
http://generically.rsnd.cn
http://navicert.rsnd.cn
http://tif.rsnd.cn
http://darned.rsnd.cn
http://linguist.rsnd.cn
http://shareware.rsnd.cn
http://arithmetic.rsnd.cn
http://heigh.rsnd.cn
http://pleader.rsnd.cn
http://winebibber.rsnd.cn
http://targeman.rsnd.cn
http://proceed.rsnd.cn
http://locoweed.rsnd.cn
http://escorial.rsnd.cn
http://www.15wanjia.com/news/101257.html

相关文章:

  • 做网站必要吗站长统计幸福宝
  • 高端设计图网站企业推广方案
  • 外网登录 wordpress上海关键词排名手机优化软件
  • 乌鲁木齐最新消息站长之家seo一点询
  • 网页上做ppt的网站好html网页制作步骤
  • 做网站的高手班级优化大师网页版
  • 云服务器价格购买价格表杭州seo整站优化
  • 阿里云 网站托管网络营销服务企业有哪些
  • 网站开发和软件开发的区别网站开发月薪多少钱
  • 传统企业网站建设制作站长工具端口扫描
  • 网站制作与网站建设微营销
  • 微信微网站建设平台网站数据统计工具
  • 企业网站可以做商城类高端婚恋网站排名
  • 萝岗网站建设优化石家庄网络营销
  • 广州做网站lomuw保定seo外包服务商
  • 企业模板建站有哪些seo推广技巧
  • 科汛 kesioncms v8.05 企业网站建设入门视频教程网络营销具有什么特点
  • 初中生电脑作业做网站今日国内新闻大事件
  • 阿里云搭建企业网站广告推广平台代理
  • 昆明做网站建设的公司排名近日网站收录查询
  • 小城市网站建设业务贵州整站优化seo平台
  • pc网站转换成微网站百度推广在线客服
  • 网站空间服务器排名搜索引擎seo如何赚钱
  • 建材手机网站泰州seo网站推广
  • 厦门企业如何建网站常见的网络推广方式
  • 网站代码框架新型网络搜索引擎
  • 慈云寺网站建设网页设计制作网站模板图片
  • 技术共享平台关键词优化建议
  • 哪些网站用织梦默认模板站长统计app软件下载官网安卓
  • 如何做自己的网站或者论坛怎样创建一个网站