refactor: 标签页重构,采用响应式storage

This commit is contained in:
xiaoxian521
2021-06-23 14:24:38 +08:00
parent 6a89af382f
commit 8177de106b
10 changed files with 181 additions and 236 deletions

22
scripts/verify-commit.js Normal file
View 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)
}

View File

@@ -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);
}