mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-21 14:13:36 +08:00
refactor: 标签页重构,采用响应式storage
This commit is contained in:
22
scripts/verify-commit.js
Normal file
22
scripts/verify-commit.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const chalk = require("chalk")
|
||||
|
||||
const msgPath = process.env.HUSKY_GIT_PARAMS
|
||||
const msg = require("fs").readFileSync(msgPath, "utf-8").trim()
|
||||
|
||||
const commitRE = /^(revert: )?(feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50}/
|
||||
|
||||
if (!commitRE.test(msg)) {
|
||||
console.error(
|
||||
` ${chalk.bgRed.white(" ERROR ")} ${chalk.red(
|
||||
"不合法的 commit 消息格式"
|
||||
)}\n\n` +
|
||||
chalk.red(" 请使用正确的提交格式:\n\n") +
|
||||
` ${chalk.green("feat: add 'comments' option")}\n` +
|
||||
` ${chalk.green("fix: handle events on blur (close #28)")}\n\n` +
|
||||
chalk.red(
|
||||
" 请查看 git commit 提交规范:https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md \n"
|
||||
)
|
||||
)
|
||||
|
||||
process.exit(1)
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
const chalk = require("chalk");
|
||||
|
||||
const msgPath = process.env.HUSKY_GIT_PARAMS;
|
||||
const msg = require("fs").readFileSync(msgPath, "utf-8").trim();
|
||||
|
||||
const commitRE = /^(revert: )?(feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50}/;
|
||||
|
||||
if (!commitRE.test(msg)) {
|
||||
console.log();
|
||||
console.error(
|
||||
` ${chalk.bgRed.white(" ERROR ")} ${chalk.red(
|
||||
"不合法的 commit 消息格式"
|
||||
)}\n\n` +
|
||||
chalk.red(" 请使用正确的提交格式:\n\n") +
|
||||
` ${chalk.green("feat: add 'comments' option")}\n` +
|
||||
` ${chalk.green("fix: handle events on blur (close #28)")}\n\n` +
|
||||
chalk.red(
|
||||
" 请查看 git commit 提交规范:https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md \n"
|
||||
)
|
||||
);
|
||||
|
||||
process.exit(1);
|
||||
}
|
||||
Reference in New Issue
Block a user