Commit 390a9e0b by liguokang

feat: 🎨

parent f077e999
......@@ -2,11 +2,17 @@
* @Author: liguokang
* @Date: 2021-07-14 20:36:28
* @LastEditors: liguokang
* @LastEditTime: 2021-07-28 11:17:40
* @LastEditTime: 2021-07-29 14:07:58
* @Description:
* @Copyrigh: ©2021 杭州杰竞科技有限公司 版权所有
-->
## 描述
## git husky使用描述
### 教程链接
https://blog.csdn.net/Xinshenbaba/article/details/117191983
### commitlint 规范地址
https://commitlint.js.org/#/reference-rules
此处为 git 相关文件
#!/bin/sh
if [ -z "$husky_skip_init" ]; then
debug () {
[ "$HUSKY_DEBUG" = "1" ] && echo "husky (debug) - $1"
}
readonly hook_name="$(basename "$0")"
debug "starting $hook_name..."
if [ "$HUSKY" = "0" ]; then
debug "HUSKY env variable is set to 0, skipping hook"
exit 0
fi
if [ -f ~/.huskyrc ]; then
debug "sourcing ~/.huskyrc"
. ~/.huskyrc
fi
export readonly husky_skip_init=1
sh -e "$0" "$@"
exitCode="$?"
if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
fi
exit $exitCode
fi
......@@ -15,7 +15,7 @@ const service = axios.create({
// request拦截器
service.interceptors.request.use(
config => {
(config) => {
if (config.url.indexOf('public/') === -1 && User.token()) {
return config;
} else if (config.headers.module) {
......@@ -27,7 +27,7 @@ service.interceptors.request.use(
return config;
}
},
error => {
(error) => {
// Do something with request error
Promise.reject(error);
},
......@@ -35,29 +35,18 @@ service.interceptors.request.use(
// response 拦截器
service.interceptors.response.use(
response => {
(response) => {
const { data } = response;
const { code, result, message } = data;
const rejectCode = [
'LOGIN_OVERDUE',
'10000',
'10001',
'10002',
'RPC_FAIL',
'ILLEGAL_ARGUMENT',
'BASIC_INFO_ERROR',
'SCHEDULE_HAS_REMOVE',
'SCHEDULE_NONE_STUDENT',
'NONE_PERMISSION_JOIN',
'VERIFY_CODE_ERROR',
];
// 坚决禁止在response中做业务异常操作
const rejectCode = [];
if (code < 200 || code > 300) {
if (code == 418) {
window.location.href = 'https://www.xiaomai5.com/maintain.html';
} else if (code == 401 || code == 403) {
User.loginIn();
} else {
processHttpError(data);
processHttpError(response);
}
return data;
// return Promise.reject(new Error('error'));
......@@ -67,13 +56,14 @@ service.interceptors.response.use(
time: new Date().toString(),
code,
errorInfo: message || result,
path: response.config.url,
});
// return Promise.reject(data);
}
return data;
}
},
error => {
(error) => {
let code = 0;
try {
code = error.response.data.status;
......@@ -82,7 +72,7 @@ service.interceptors.response.use(
} else if (code == 401 || code == 403) {
User.loginIn();
} else {
processHttpError(error.response.data);
processHttpError(error.response);
}
} catch (e) {
if (error.toString().indexOf('Error: timeout') !== -1) {
......@@ -104,7 +94,8 @@ service.interceptors.response.use(
return Promise.reject(error);
},
);
function processHttpError(data) {
function processHttpError(response) {
const { data } = response;
let message = '';
const status = Number(data.code) > 0 ? Number(data.code) : Number(data.status);
const code = Number(data.code);
......@@ -122,9 +113,10 @@ function processHttpError(data) {
message = data.message;
}
console.table({
time: new Date().toString(),
code: code > 0 ? code : status,
time: new Date().toString(),
errorInfo: message,
path: response.config.url,
});
Vue.$wheatToast({
message: message,
......
#! /usr/bin/env node
/*
* @Author: 吴文洁
* @Date: 2020-06-05 14:59:14
* @LastEditors: liguokang
* @LastEditTime: 2021-07-29 13:37:55
* @Description:
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
const fs = require('fs')
console.log(process);
const [
messageFile,
commitType,
] = process.env.$1.split(' ');
if (commitType == null) {
const currentMessage = fs.readFileSync(messageFile, 'utf8');
// eslint-disable-next-line no-console
const pattern = new RegExp('(feat|fix|style|docs|refactor|pref|test):');
const _currentMessage = currentMessage.replace('\n', '');
if (!pattern.test(currentMessage) && currentMessage.indexOf('Merge branch') === -1) {
// eslint-disable-next-line no-console
console.error(`\x1b[31m ${_currentMessage}不符合commit-msg规范,具体规范请访问 http://wiki.ixm5.cn/pages/viewpage.action?pageId=2918494 \x1b[31m`);
process.exit(1);
}
if (_currentMessage.length <= 10) {
// eslint-disable-next-line no-console
console.error(`\x1b[31m ${_currentMessage}提交的信息字数不得少于5个字符`);
process.exit(1);
}
process.exit(0);
}
#! /usr/bin/env node
/*
* @Author: 吴文洁
* @Date: 2020-06-05 09:38:03
* @LastEditors: louzhedong
* @LastEditTime: 2020-12-26 16:08:19
* @Description:
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
const execSync = require('child_process').execSync;
// 获取当前分支名称
const branchName = execSync('git rev-parse --abbrev-ref HEAD').toString().trim();
// 校验分支名是否合法
const firstPattern = new RegExp('dev|rc|gray|master');
const secondPattern = new RegExp('(feature|hotfix)/[a-z]{4,}/[0-9]{8,}/[0-9a-zA-Z-]{3,}');
const firstMatch = firstPattern.test(branchName);
const secondMatch = secondPattern.test(branchName);
if (!firstMatch && !secondMatch) {
// eslint-disable-next-line no-console
console.error(`\x1b[31m ${branchName}不符合分支规范,具体规范请访问 http://wiki.ixm5.cn/pages/viewpage.action?pageId=2918496 \x1b[31m`);
process.exit(1);
}
// 获取缓存区内容
// 通过diff指令获得所有改动过(不包括删除)的js文件路径
const fileNameStr = execSync('git diff --diff-filter=AM --cached HEAD --name-only').toString();
// 过滤掉空格
const fileNameList = fileNameStr.split('\n').filter((item) => !!item);
// 获取需要检测的文件
const detectedFileList = fileNameList.filter((file) => {
// 过滤掉空的和hooks文件夹下所有的文件
return file && file.indexOf('hooks') < 0;
});
// 遍历需要检测的文件
let errorFileList = [];
detectedFileList.forEach((file) => {
const results = execSync(`git diff --cached ${file}`);
const pattern = /^http\:\/\/.{1,}/;
if (pattern.test(results.toString())) {
errorFileList.push(file);
}
});
if (errorFileList.length > 0) {
const errorFileStr = JSON.stringify(errorFileList);
// eslint-disable-next-line no-console
console.error(`\x1b[31m ${errorFileStr}文件中存在不合法的http://,请将http替换为https \x1b[31m`);
process.exit(1);
}
// 校验是否有冲突
const conflictPattern = new RegExp('^<<<<<<<\\s|^=======$|^>>>>>>>\\s');
const conflictFileList = [];
fileNameList.forEach((file) => {
const results = execSync(`git diff --cached ${file}`);
if (conflictPattern.test(results)) {
conflictFileList.push(file);
}
});
if (conflictFileList.length > 0) {
const conflictFileStr = JSON.stringify(conflictFileList);
// eslint-disable-next-line no-console
console.error(`\x1b[31m ${conflictFileStr}文件中存在冲突,请解决冲突之后再提交 \x1b[31m`);
process.exit(1);
}
process.exit(0);
import { actionTypes } from './action-types';
import { actionTypes } from './actionTypes';
export function changeCity(city) {
return {
......
......@@ -2,12 +2,12 @@
* @Author: liguokang
* @Date: 2021-07-15 10:12:48
* @LastEditors: liguokang
* @LastEditTime: 2021-07-15 10:26:23
* @LastEditTime: 2021-07-29 14:09:11
* @Description:
* @Copyrigh: ©2021 杭州杰竞科技有限公司 版权所有
*/
import { actionTypes } from '../action/action-types';
import { actionTypes } from '../action/actionTypes';
let initState = {
city: '',
......
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
> git status -z -u
> git symbolic-ref --short HEAD
> git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/master refs/remotes/master
> git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname)
> git remote --verbose
> git config --get commit.template
process {
version: 'v14.17.0',
versions: {
node: '14.17.0',
v8: '8.4.371.23-node.63',
uv: '1.41.0',
zlib: '1.2.11',
brotli: '1.0.9',
ares: '1.17.1',
modules: '83',
nghttp2: '1.42.0',
napi: '8',
llhttp: '2.1.3',
openssl: '1.1.1k',
cldr: '38.1',
icu: '68.2',
tz: '2020d',
unicode: '13.0'
},
arch: 'x64',
platform: 'win32',
release: {
name: 'node',
lts: 'Fermium',
sourceUrl: 'https://nodejs.org/download/release/v14.17.0/node-v14.17.0.tar.gz',
headersUrl: 'https://nodejs.org/download/release/v14.17.0/node-v14.17.0-headers.tar.gz',
libUrl: 'https://nodejs.org/download/release/v14.17.0/win-x64/node.lib'
},
_rawDebug: [Function: _rawDebug],
moduleLoadList: [
'Internal Binding native_module',
'Internal Binding errors',
'NativeModule internal/errors',
'Internal Binding config',
'Internal Binding constants',
'Internal Binding util',
'Internal Binding types',
'NativeModule internal/util',
'NativeModule internal/util/types',
'NativeModule internal/assert',
'Internal Binding icu',
'NativeModule internal/util/inspect',
'NativeModule internal/validators',
'NativeModule events',
'Internal Binding buffer',
'Internal Binding string_decoder',
'NativeModule internal/buffer',
'NativeModule buffer',
'Internal Binding symbols',
'Internal Binding messaging',
'NativeModule internal/worker/js_transferable',
'NativeModule internal/process/per_thread',
'Internal Binding process_methods',
'Internal Binding credentials',
'Internal Binding async_wrap',
'Internal Binding task_queue',
'NativeModule internal/async_hooks',
'NativeModule internal/process/promises',
'NativeModule internal/fixed_queue',
'NativeModule async_hooks',
'NativeModule internal/process/task_queues',
'Internal Binding trace_events',
'NativeModule internal/constants',
'NativeModule internal/console/constructor',
'NativeModule internal/console/global',
'NativeModule internal/util/inspector',
'Internal Binding inspector',
'NativeModule internal/querystring',
'NativeModule path',
'Internal Binding url',
'NativeModule internal/url',
'NativeModule internal/encoding',
'Internal Binding timers',
'NativeModule internal/linkedlist',
'NativeModule internal/priority_queue',
'NativeModule internal/util/debuglog',
'NativeModule internal/timers',
'NativeModule timers',
'NativeModule internal/process/execution',
'NativeModule internal/process/warning',
'NativeModule internal/process/signal',
'Internal Binding options',
'NativeModule internal/options',
'NativeModule internal/bootstrap/pre_execution',
'NativeModule internal/inspector_async_hook',
'Internal Binding report',
'NativeModule internal/process/report',
'Internal Binding fs',
'NativeModule internal/fs/utils',
'Internal Binding fs_dir',
'NativeModule internal/fs/dir',
'NativeModule fs',
'NativeModule internal/idna',
'NativeModule url',
'NativeModule internal/modules/cjs/helpers',
'NativeModule internal/source_map/source_map_cache',
'Internal Binding contextify',
'NativeModule vm',
'NativeModule internal/modules/package_json_reader',
'Internal Binding module_wrap',
'NativeModule internal/modules/esm/module_job',
'NativeModule internal/modules/esm/module_map',
'NativeModule internal/modules/esm/resolve',
'NativeModule internal/modules/esm/get_format',
'NativeModule internal/fs/rimraf',
'NativeModule internal/fs/promises',
'NativeModule internal/modules/esm/get_source',
'NativeModule internal/modules/esm/transform_source',
'NativeModule internal/modules/esm/create_dynamic_module',
'NativeModule internal/modules/esm/translators',
'NativeModule internal/modules/esm/loader',
'NativeModule internal/vm/module',
'NativeModule internal/process/esm_loader',
'NativeModule internal/modules/cjs/loader',
'NativeModule internal/modules/run_main',
'NativeModule internal/streams/destroy',
'NativeModule internal/streams/pipeline',
'NativeModule internal/streams/end-of-stream',
'NativeModule internal/streams/legacy',
'NativeModule internal/streams/buffer_list',
'NativeModule internal/streams/state',
'NativeModule internal/streams/readable',
'NativeModule internal/streams/writable',
'NativeModule internal/streams/duplex',
'NativeModule internal/streams/transform',
'NativeModule internal/streams/passthrough',
'NativeModule stream',
'NativeModule internal/fs/streams',
'NativeModule internal/net',
'Internal Binding uv',
... 7 more items
],
binding: [Function: binding],
_linkedBinding: [Function: _linkedBinding],
_events: [Object: null prototype] {
newListener: [Function: startListeningIfSignal],
removeListener: [Function: stopListeningIfSignal],
warning: [Function: onWarning]
},
_eventsCount: 3,
_maxListeners: undefined,
domain: null,
_exiting: false,
config: {
target_defaults: {
cflags: [],
default_configuration: 'Release',
defines: [],
include_dirs: [],
libraries: []
},
variables: {
asan: 0,
build_v8_with_gn: false,
coverage: false,
dcheck_always_on: 0,
debug_nghttp2: false,
debug_node: false,
enable_lto: false,
enable_pgo_generate: false,
enable_pgo_use: false,
error_on_warn: false,
force_dynamic_crt: 0,
host_arch: 'x64',
icu_data_in: '..\\..\\deps\\icu-tmp\\icudt68l.dat',
icu_endianness: 'l',
icu_gyp_path: 'tools/icu/icu-generic.gyp',
icu_path: 'deps/icu-small',
icu_small: false,
icu_ver_major: '68',
is_debug: 0,
napi_build_version: '8',
nasm_version: '2.14',
node_byteorder: 'little',
node_debug_lib: false,
node_enable_d8: false,
node_install_npm: true,
node_module_version: 83,
node_no_browser_globals: false,
node_prefix: '/usr/local',
node_release_urlbase: 'https://nodejs.org/download/release/',
node_shared: false,
node_shared_brotli: false,
node_shared_cares: false,
node_shared_http_parser: false,
node_shared_libuv: false,
node_shared_nghttp2: false,
node_shared_openssl: false,
node_shared_zlib: false,
node_tag: '',
node_target_type: 'executable',
node_use_bundled_v8: true,
node_use_dtrace: false,
node_use_etw: true,
node_use_node_code_cache: true,
node_use_node_snapshot: true,
node_use_openssl: true,
node_use_v8_platform: true,
node_with_ltcg: true,
node_without_node_options: false,
openssl_fips: '',
openssl_is_fips: false,
ossfuzz: false,
shlib_suffix: 'so.83',
target_arch: 'x64',
v8_enable_31bit_smis_on_64bit_arch: 0,
v8_enable_gdbjit: 0,
v8_enable_i18n_support: 1,
v8_enable_inspector: 1,
v8_enable_lite_mode: 0,
v8_enable_object_print: 1,
v8_enable_pointer_compression: 0,
v8_no_strict_aliasing: 1,
v8_optimized_debug: 1,
v8_promise_internal_field_count: 1,
v8_random_seed: 0,
v8_trace_maps: 0,
v8_use_siphash: 1,
want_separate_host_toolset: 0
}
},
dlopen: [Function: dlopen],
uptime: [Function: uptime],
_getActiveRequests: [Function: _getActiveRequests],
_getActiveHandles: [Function: _getActiveHandles],
reallyExit: [Function: reallyExit],
_kill: [Function: _kill],
hrtime: [Function: hrtime] { bigint: [Function: hrtimeBigInt] },
cpuUsage: [Function: cpuUsage],
resourceUsage: [Function: resourceUsage],
memoryUsage: [Function: memoryUsage],
kill: [Function: kill],
exit: [Function: exit],
openStdin: [Function (anonymous)],
allowedNodeEnvironmentFlags: [Getter/Setter],
assert: [Function: deprecated],
features: {
inspector: true,
debug: false,
uv: true,
ipv6: true,
tls_alpn: true,
tls_sni: true,
tls_ocsp: true,
tls: true,
cached_builtins: true
},
_fatalException: [Function (anonymous)],
setUncaughtExceptionCaptureCallback: [Function: setUncaughtExceptionCaptureCallback],
hasUncaughtExceptionCaptureCallback: [Function: hasUncaughtExceptionCaptureCallback],
emitWarning: [Function: emitWarning],
nextTick: [Function: nextTick],
_tickCallback: [Function: runNextTicks],
_debugProcess: [Function: _debugProcess],
_debugEnd: [Function: _debugEnd],
_startProfilerIdleNotifier: [Function (anonymous)],
_stopProfilerIdleNotifier: [Function (anonymous)],
stdout: [Getter],
stdin: [Getter],
stderr: [Getter],
abort: [Function: abort],
umask: [Function: wrappedUmask],
chdir: [Function: wrappedChdir],
cwd: [Function: wrappedCwd],
env: {
ALLUSERSPROFILE: 'C:\\ProgramData',
APPDATA: 'C:\\Users\\Administrator\\AppData\\Roaming',
APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL: 'true',
CHROME_CRASHPAD_PIPE_NAME: '\\\\.\\pipe\\crashpad_24492_JOMADULOFGRQJNUF',
COMMONPROGRAMFILES: 'C:\\Program Files\\Common Files',
COMPUTERNAME: 'XM',
COMSPEC: 'C:\\WINDOWS\\system32\\cmd.exe',
'CommonProgramFiles(x86)': 'C:\\Program Files (x86)\\Common Files',
CommonProgramW6432: 'C:\\Program Files\\Common Files',
DataGrip: 'D:\\softs\\JetBrains\\bin;',
'DevEco Studio': 'D:\\softs\\DevEco Studio 2.1.0.501\\bin;',
DriverData: 'C:\\Windows\\System32\\Drivers\\DriverData',
ELECTRON_RUN_AS_NODE: '1',
FLUTTER_HOME: 'D:\\softs\\flutters\\',
FLUTTER_STORAGE_BASE_UR: 'https://storage.flutter-io.cn',
GIT_ASKPASS: 'd:\\Vscode\\Microsoft VS Code\\resources\\app\\extensions\\git\\dist\\askpass.sh',
GIT_AUTHOR_DATE: '@1627537081 +0800',
GIT_AUTHOR_EMAIL: 'liguokang@xiaomai5.com',
GIT_AUTHOR_NAME: 'liguokang',
GIT_CONFIG_PARAMETERS: "'user.useConfigOnly'='true'",
GIT_EDITOR: ':',
GIT_EXEC_PATH: 'C:/Program Files/Git/mingw64/libexec/git-core',
GIT_INDEX_FILE: '.git/index',
GIT_PAGER: 'cat',
GIT_PREFIX: '',
HOME: 'C:\\Users\\Administrator',
HOMEDRIVE: 'C:',
HOMEPATH: '\\Users\\Administrator',
'IntelliJ IDEA': 'D:\\softs\\IntelliJ IDEA 2021.1.2\\bin;',
LANG: 'en_US.UTF-8',
LC_ALL: 'en_US.UTF-8',
LOCALAPPDATA: 'C:\\Users\\Administrator\\AppData\\Local',
LOGONSERVER: '\\\\XM',
MSYSTEM: 'MINGW64',
NUMBER_OF_PROCESSORS: '12',
ORIGINAL_XDG_CURRENT_DESKTOP: 'undefined',
OS: 'Windows_NT',
OneDrive: 'C:\\Users\\Administrator\\OneDrive',
OneDriveConsumer: 'C:\\Users\\Administrator\\OneDrive',
PATH: 'C:\\Program Files\\Git\\mingw64\\libexec\\git-core;C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Users\\Administrator\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0;C:\\WINDOWS\\System32\\OpenSSH;C:\\Program Files\\nodejs;C:\\Program Files\\Git\\cmd;D:\\softs\\flutters\\bin;D:\\softs\\flutters\\bin\\cache\\dart-sdk;C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Administrator\\AppData\\Roaming\\npm;D:\\Vscode\\Microsoft VS Code\\bin;D:\\softs\\JetBrains\\bin;C:\\Program Files\\Bandizip;D:\\softs\\IntelliJ IDEA 2021.1.2\\bin;D:\\softs\\DevEco Studio 2.1.0.501\\bin',
PATHEXT: '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC',
PLINK_PROTOCOL: 'ssh',
PROCESSOR_ARCHITECTURE: 'AMD64',
PROCESSOR_IDENTIFIER: 'Intel64 Family 6 Model 158 Stepping 10, GenuineIntel',
PROCESSOR_LEVEL: '6',
PROCESSOR_REVISION: '9e0a',
PROGRAMFILES: 'C:\\Program Files',
PSModulePath: 'C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules',
PUBLIC: 'C:\\Users\\Public',
PUB_HOSTED_URL: 'https://pub.flutter-io.cn',
PWD: 'E:/workspace/xiaomai-website-ssr-template',
ProgramData: 'C:\\ProgramData',
'ProgramFiles(x86)': 'C:\\Program Files (x86)',
ProgramW6432: 'C:\\Program Files',
SESSIONNAME: 'Console',
SHLVL: '2',
SYSTEMDRIVE: 'C:',
SYSTEMROOT: 'C:\\WINDOWS',
TEMP: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp',
TERM: 'cygwin',
TMP: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp',
TMPDIR: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp',
USERDOMAIN: 'XM',
USERDOMAIN_ROAMINGPROFILE: 'XM',
USERNAME: 'Administrator',
USERPROFILE: 'C:\\Users\\Administrator',
VSCODE_AMD_ENTRYPOINT: 'vs/workbench/services/extensions/node/extensionHostProcess',
VSCODE_BROWSER_CODE_LOADING: 'bypassHeatCheck',
VSCODE_CODE_CACHE_PATH: 'C:\\Users\\Administrator\\AppData\\Roaming\\Code\\CachedData\\c3f126316369cd610563c75b1b1725e0679adfb3',
VSCODE_CWD: 'E:\\workspace\\xiaomai-website-ssr-template',
VSCODE_GIT_ASKPASS_MAIN: 'd:\\Vscode\\Microsoft VS Code\\resources\\app\\extensions\\git\\dist\\askpass-main.js',
VSCODE_GIT_ASKPASS_NODE: 'D:\\Vscode\\Microsoft VS Code\\Code.exe',
VSCODE_GIT_COMMAND: '-c',
VSCODE_GIT_IPC_HANDLE: '\\\\.\\pipe\\vscode-git-4e1e1d73c0-sock',
VSCODE_HANDLES_UNCAUGHT_ERRORS: 'true',
VSCODE_IPC_HOOK: '\\\\.\\pipe\\9e7283c68e6159fd1e9872b65f264be5-1.58.2-main-sock',
VSCODE_IPC_HOOK_EXTHOST: '\\\\.\\pipe\\vscode-ipc-42a0645d-3d6d-4156-bde6-010116cc0405-sock',
VSCODE_LOG_NATIVE: 'false',
VSCODE_LOG_STACK: 'false',
VSCODE_NLS_CONFIG: '{"locale":"zh-cn","availableLanguages":{"*":"zh-cn"},"_languagePackId":"fa871dcc52f689d5c3b8a42d026c7d06.zh-cn","_translationsConfigFile":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Roaming\\\\Code\\\\clp\\\\fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\\\\tcf.json","_cacheRoot":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Roaming\\\\Code\\\\clp\\\\fa871dcc52f689d5c3b8a42d026c7d06.zh-cn","_resolvedLanguagePackCoreLocation":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Roaming\\\\Code\\\\clp\\\\fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\\\\c3f126316369cd610563c75b1b1725e0679adfb3","_corruptedFile":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Roaming\\\\Code\\\\clp\\\\fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\\\\corrupted.info","_languagePackSupport":true}',
VSCODE_PID: '24492',
VSCODE_PIPE_LOGGING: 'true',
VSCODE_VERBOSE_LOGGING: 'true',
WINDIR: 'C:\\WINDOWS',
WXDRIVE_START_ARGS: '--wxdrive-setting=0 --disable-gpu --disable-software-rasterizer --enable-features=NetworkServiceInProcess',
_: 'C:/Program Files/nodejs/node',
husky_skip_init: '1'
},
title: 'C:\\Program Files\\Git\\cmd\\git.exe',
argv: [
'C:\\Program Files\\nodejs\\node.exe',
'E:\\workspace\\xiaomai-website-ssr-template\\hooks\\commit-msg.js'
],
execArgv: [],
pid: 7748,
ppid: 4172,
execPath: 'C:\\Program Files\\nodejs\\node.exe',
debugPort: 9229,
argv0: 'C:\\Program Files\\nodejs\\node.exe',
_preload_modules: [],
mainModule: Module {
id: '.',
path: 'E:\\workspace\\xiaomai-website-ssr-template\\hooks',
exports: {},
parent: null,
filename: 'E:\\workspace\\xiaomai-website-ssr-template\\hooks\\commit-msg.js',
loaded: false,
children: [],
paths: [
'E:\\workspace\\xiaomai-website-ssr-template\\hooks\\node_modules',
'E:\\workspace\\xiaomai-website-ssr-template\\node_modules',
'E:\\workspace\\node_modules',
'E:\\node_modules'
]
},
[Symbol(kCapture)]: false
}
E:\workspace\xiaomai-website-ssr-template\hooks\commit-msg.js:17
] = process.env.$1.split(' ');
^
TypeError: Cannot read property 'split' of undefined
at Object.<anonymous> (E:\workspace\xiaomai-website-ssr-template\hooks\commit-msg.js:17:20)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
husky - pre-commit hook exited with code 1 (error)
> git config --get-all user.name
> git config --get-all user.email
> git ls-tree -l HEAD -- E:\workspace\xiaomai-website-ssr-template\hooks\commit-msg.js
> git ls-files --stage -- E:\workspace\xiaomai-website-ssr-template\hooks\commit-msg.js
> git show --textconv HEAD:hooks/commit-msg.js
> git cat-file -s 2f367681fca10254b64f81f1589ab3e55e0f9cdb
> git show --textconv :hooks/commit-msg.js
> git status -z -u
> git symbolic-ref --short HEAD
> git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/master refs/remotes/master
> git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname)
> git remote --verbose
> git config --get commit.template
\ No newline at end of file
......@@ -2,8 +2,7 @@ html,
body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
font-size: 14px;
}
......
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