Commit 30f24f84 authored by jiaxu.yan's avatar jiaxu.yan

feat: 提交框架修改重新调整哈士奇

parent 17cea665
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"
# npm exec run ./scripts/pre-commit.js
npm exec tsno run ./src/scripts/pre-commit.ts
// module.exports = { extends: ['@commitlint/config-conventional'] }
// eslint-disable-next-line no-undef
module.exports = {
extends: ['./node_modules/vue-cli-plugin-commitlint/lib/lint']
};
extends: ['@commitlint/config-conventional'], // extends can be nested
parserPreset: 'conventional-changelog-conventionalcommits',
prompt: {
settings: {},
messages: {
skip: ':skip',
max: 'upper %d chars',
min: '%d chars at least',
emptyWarning: 'can not be empty',
upperLimitWarning: 'over limit',
lowerLimitWarning: 'below limit'
},
types: [
{ value: 'feat', name: 'feat: ✨ A new feature', emoji: '✨ ' },
{ value: 'fix', name: 'fix: 🐛 A bug fix', emoji: '🐛 ' },
{ value: 'docs', name: 'docs: 📝 Documentation only changes', emoji: '📝 ' },
{
value: 'style',
name: 'style: 💄 Changes that do not affect the meaning of the code',
emoji: '💄 '
},
{
value: 'refactor',
name: 'refactor: 📦️ A code change that neither fixes a bug nor adds a feature',
emoji: '📦️ '
},
{
value: 'perf',
name: 'perf: 🚀 A code change that improves performance',
emoji: '🚀 '
},
{
value: 'test',
name: 'test: 🚨 Adding missing tests or correcting existing tests',
emoji: '🚨 '
},
{
value: 'build',
name: 'build: 🛠 Changes that affect the build system or external dependencies',
emoji: '🛠 '
},
{
value: 'ci',
name: 'ci: 🎡 Changes to our CI configuration files and scripts',
emoji: '🎡 '
},
{
value: 'chore',
name: "chore: 🔨 Other changes that don't modify src or test files",
emoji: '🔨 '
},
{ value: 'revert', name: 'revert: ⏪️ Reverts a previous commit', emoji: ':rewind:' }
],
useEmoji: true,
confirmColorize: true,
emojiAlign: 'center',
questions: {
scope: {
description: 'What is the scope of this change (e.g. component or file name)'
},
subject: {
description: 'Write a short, imperative tense description of the change'
},
body: {
description: 'Provide a longer description of the change'
},
isBreaking: {
description: 'Are there any breaking changes?'
},
breakingBody: {
description:
'A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself'
},
breaking: {
description: 'Describe the breaking changes'
},
isIssueAffected: {
description: 'Does this change affect any open issues?'
},
issuesBody: {
description:
'If issues are closed, the commit requires a body. Please enter a longer description of the commit itself'
},
issues: {
description: 'Add issue references (e.g. "fix #123", "re #123".)'
}
}
}
}
......@@ -7,6 +7,7 @@
"stylelint:fix": "stylelint src/**/*.{html,vue,sass} --fix",
"lint:fix": "prettier src/**/* --write",
"lint": "eslint src/**/* --ext .js,.vue",
"lint:stage": "lint-staged",
"build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"cz": "npm run log && git add . && git cz",
......@@ -14,7 +15,9 @@
"log": "conventional-changelog --config ./node_modules/vue-cli-plugin-commitlint/lib/log -i CHANGELOG.md -s -r 0",
"preview": "node build/index.js --preview",
"spellcheck": "cspell lint --dot --gitignore --color --cache --show-suggestions \"src/**/*.@(html|js|cjs|mjs|ts|tsx|css|scss|md|vue)\"",
"prepare": "husky install"
"prepare": "husky install",
"commit": "git-cz",
"commitlint": "commitlint --edit"
},
"dependencies": {
"@riophae/vue-treeselect": "0.4.0",
......@@ -87,7 +90,7 @@
],
"config": {
"commitizen": {
"path": "./node_modules/vue-cli-plugin-commitlint/lib/cz"
"path": "node_modules/cz-git"
}
},
"engines": {
......@@ -111,10 +114,9 @@
],
"license": "MIT",
"lint-staged": {
"src/**/*.{js,vue}": [
"eslint --fix",
"git add"
]
"src/**/*.{html,vue,css,sass,scss,js}": "prettier --write",
"src/**/*.{vue,js}": "eslint --fix",
"src/**/*.{vue,css,sass,scss}": "stylelint --fix"
},
"repository": {
"type": "git",
......
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543827393750" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4695" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: rbicon; src: url("chrome-extension://dipiagiiohfljcicegpgffpbnjmgjcnf/fonts/rbicon.woff2") format("woff2"); font-weight: normal; font-style: normal; }
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543827393750" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4695" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: rbicon; src: url("chrome-extension://dipiagiiohfljcicegpgffpbnjmgjcnf/fonts/rbicon.woff2") format("woff2"); font-weight: normal; font-style: normal; }
</style></defs><path d="M64 64V640H896V64H64zM0 0h960v704H0V0z" p-id="4696"></path><path d="M192 896H768v64H192zM448 640H512v256h-64z" p-id="4697"></path><path d="M479.232 561.604267l309.9904-348.330667-47.803733-42.5472-259.566934 291.669333L303.957333 240.008533 163.208533 438.6048l52.224 37.009067 91.6224-129.28z" p-id="4698"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543827724451" class="icon" style="" viewBox="0 0 1084 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10233" xmlns:xlink="http://www.w3.org/1999/xlink" width="211.71875" height="200"><defs><style type="text/css">@font-face { font-family: rbicon; src: url("chrome-extension://dipiagiiohfljcicegpgffpbnjmgjcnf/fonts/rbicon.woff2") format("woff2"); font-weight: normal; font-style: normal; }
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543827724451" class="icon" style="" viewBox="0 0 1084 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10233" xmlns:xlink="http://www.w3.org/1999/xlink" width="211.71875" height="200"><defs><style type="text/css">@font-face { font-family: rbicon; src: url("chrome-extension://dipiagiiohfljcicegpgffpbnjmgjcnf/fonts/rbicon.woff2") format("woff2"); font-weight: normal; font-style: normal; }
</style></defs><path d="M1080.09609 434.500756c-4.216302-23.731757-26.9241-47.945376-50.595623-53.185637l-17.648235-4.095836a175.940257 175.940257 0 0 1-101.612877-80.832531 177.807476 177.807476 0 0 1-18.732427-129.801867l5.541425-16.684509c7.10748-23.129428-2.108151-54.992624-20.599646-70.833873 0 0-16.624276-14.094495-63.244529-41.199293-46.800951-26.984332-66.858502-34.513443-66.858502-34.513443-22.76803-8.372371-54.631227-0.361397-71.255503 17.407304l-12.287509 13.251234a173.470708 173.470708 0 0 1-120.465769 48.065842A174.13327 174.13327 0 0 1 421.329029 33.590675L409.583617 20.761071C393.140039 2.99237 361.096144-4.898138 338.267881 3.353767c0 0-20.358715 7.529111-67.099434 34.513443-46.800951 27.34573-63.244529 41.440225-63.244529 41.440225-18.431263 15.66055-27.646894 47.222582-20.539413 70.592941l5.059562 16.865207a178.048407 178.048407 0 0 1-18.672194 129.621169 174.916297 174.916297 0 0 1-102.275439 81.073463l-17.045906 3.854904c-23.310126 5.42096-46.258856 29.333415-50.595623 53.185637 0 0-3.854905 21.382674-3.854905 75.712737 0 54.330062 3.854905 75.712736 3.854905 75.712736 4.216302 23.972688 26.9241 47.945376 50.595623 53.185637l16.624276 3.854905a174.253736 174.253736 0 0 1 102.395904 81.314394c23.310126 40.837896 28.911785 87.337683 18.732427 129.801867l-4.81863 16.443578c-7.10748 23.129428 2.108151 54.992624 20.599646 70.833872 0 0 16.624276 14.094495 63.244529 41.199293 46.800951 27.104798 66.918735 34.513443 66.918735 34.513443 22.707798 8.372371 54.631227 0.361397 71.255503-17.407303l11.624947-12.588673a175.096996 175.096996 0 0 1 242.256662 0.120465l11.624947 12.648906c16.383345 17.708468 48.427239 25.598976 71.255503 17.347071 0 0 20.358715-7.529111 67.159666-34.513443 46.740719-27.104798 63.124063-41.199293 63.124064-41.199293 18.491496-15.600317 27.707127-47.463513 20.599646-70.833873l-5.059562-17.106139a176.723284 176.723284 0 0 1 18.672194-129.139305 176.060722 176.060722 0 0 1 102.395904-81.314394l16.68451-3.854905c23.310126-5.42096 46.258856-29.333415 50.595623-53.185637 0 0 3.854905-21.382674 3.854904-75.712737-0.240932-54.330062-4.095836-75.833202-4.095836-75.833202z m-537.819428 293.334149c-119.261112 0-216.175824-97.336342-216.175824-217.621412a216.657687 216.657687 0 0 1 216.236057-217.320249c119.200879 0 216.115591 97.276109 216.11559 217.56118-0.240932 120.044139-96.974945 217.320248-216.175823 217.320249z" p-id="10234"></path></svg>
\ No newline at end of file
......@@ -12,7 +12,7 @@ import { printObject } from './utils'
// })
// check type and stage
await Promise.all([$`npm run lint`]).catch(out => {
await Promise.all([$`npm run lint:stage`]).catch(out => {
printObject(out)
throw new Error(out.stdout)
})
#!/usr/bin/env zx
import {createRequire as __$$createRequireN} from 'module';var require=__$$createRequireN(import.meta.url);
var __getOwnPropNames = Object.getOwnPropertyNames;
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
// node_modules/.pnpm/tsno@2.0.0/node_modules/tsno/dist/client.js
import { createRequire as __$$createRequire } from "module";
var require2;
var init_client = __esm({
"node_modules/.pnpm/tsno@2.0.0/node_modules/tsno/dist/client.js"() {
require2 = __$$createRequire("file:///Volumes/ELEMENT/\u4E2D\u6C7D\u7814\u6D4B\u8BD5\u9879\u76EE/web/node_modules/.pnpm/tsno@2.0.0/node_modules/tsno/dist/client.js");
}
});
// src/scripts/utils.ts
function printObject(object, method = "log") {
for (const [key, value] of Object.entries(object)) {
console[method](`${key}:
${value}
`);
}
}
var init_utils = __esm({
"src/scripts/utils.ts"() {
init_client();
}
});
// src/scripts/check.ts
var check_exports = {};
import { $ } from "zx";
var init_check = __esm({
async "src/scripts/check.ts"() {
init_client();
init_utils();
await Promise.all([$`npm run lint:stage`]).catch((out) => {
printObject(out);
throw new Error(out.stdout);
});
}
});
// src/scripts/pre-commit.ts
init_client();
import { $ as $2 } from "zx";
console.log("\u5F00\u59CB\u6267\u884C\u4EE3\u7801\u8D28\u91CF\u8BC4\u4F30...\n");
await init_check().then(() => check_exports).catch((out) => {
throw new Error("\u4EE3\u7801\u8D28\u91CF\u8BC4\u4F30\u5931\u8D25, \u8BF7\u68C0\u67E5\u4EE3\u7801");
});
console.log('printf "\u68C0\u6D4B\u901A\u8FC7, \u521B\u5EFA commit \u4E2D...\n');
await $2`git add .`;
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsibm9kZV9tb2R1bGVzLy5wbnBtL3Rzbm9AMi4wLjAvbm9kZV9tb2R1bGVzL3Rzbm8vZGlzdC9jbGllbnQuanMiLCAic3JjL3NjcmlwdHMvdXRpbHMudHMiLCAic3JjL3NjcmlwdHMvY2hlY2sudHMiLCAic3JjL3NjcmlwdHMvcHJlLWNvbW1pdC50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiaW1wb3J0IHtjcmVhdGVSZXF1aXJlIGFzIF9fJCRjcmVhdGVSZXF1aXJlfSBmcm9tICdtb2R1bGUnO3ZhciByZXF1aXJlPV9fJCRjcmVhdGVSZXF1aXJlKFwiZmlsZTovLy9Wb2x1bWVzL0VMRU1FTlQvXHU0RTJEXHU2QzdEXHU3ODE0XHU2RDRCXHU4QkQ1XHU5ODc5XHU3NkVFL3dlYi9ub2RlX21vZHVsZXMvLnBucG0vdHNub0AyLjAuMC9ub2RlX21vZHVsZXMvdHNuby9kaXN0L2NsaWVudC5qc1wiKTtcbmltcG9ydCB7XG4gIGNvbG9yc1xufSBmcm9tIFwiLi9jaHVuay1GSERYWE9LWS5qc1wiO1xuXG5cbi8vIHNyYy9jbGllbnQudHNcbnZhciBmZ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QUFxQixDQUFDLEVBQUUsTUFBTSxTQUFPO0FBQ3RELGtCQUFZLEdBQUc7QUFDZixZQUFNLElBQUksTUFBTSxJQUFJLE1BQU07QUFBQSxJQUM1QixDQUFDO0FBQUE7QUFBQTs7O0FDakJEO0FBRUEsU0FBUyxLQUFBQyxVQUFTO0FBRWxCLFFBQVEsSUFBSSxtRUFBaUI7QUFFN0IsTUFBTSx1Q0FBa0IsTUFBTSxTQUFPO0FBQ25DLFFBQU0sSUFBSSxNQUFNLGtGQUFpQjtBQUNuQyxDQUFDO0FBRUQsUUFBUSxJQUFJLG1FQUFnQztBQUU1QyxNQUFNQTsiLAogICJuYW1lcyI6IFsicmVxdWlyZSIsICIkIl0KfQo=
import { ProcessOutput } from 'zx/core'
export function printObject(object, method = 'log') {
for (const [key, value] of Object.entries(object)) {
// eslint-disable-next-line no-console
console[method](`${key}:\n${value}\n`)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment