1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-04-14 18:30:30 +08:00

feat: 优化lint校验、markdown文档更新、脚本修改等

This commit is contained in:
142vip.cn
2023-11-07 17:06:58 +08:00
parent ae10c590c3
commit 8a10772cf9
23 changed files with 147 additions and 236 deletions

View File

@@ -36,7 +36,7 @@ exports.execShell = async commands => {
// await syncExec(command)
const execResult = await exec(command)
// 打印输出结果
// console.log(execResult.stdout);
console.log(execResult.stdout);
console.log(`step${count}(ending): === \n`)
// 指令异常不执行后续指令非0退出
if (execResult.code !== 0) {
@@ -44,16 +44,4 @@ exports.execShell = async commands => {
break;
}
}
}
/**
* 脚本基础设置
*/
exports.BaseSetting = {
successLogger: "\033[36m",
errorLogger: "\033[1;31m",
warnLogger: "\033[1;33m",
// 定义时间
currentTime: '$(date "+%Y-%m-%d %H:%M:%S")'
}
}

View File

@@ -11,7 +11,8 @@ echo "期望的 pnpm 大版本号:$majorVersionRequired"
# 检测 pnpm 是否已安装并且大版本号符合要求
checkPNPMVersion() {
local pnpmVersionInstalled=$(pnpm --version 2>/dev/null) # 获取已安装的 pnpm 版本
# 获取已安装的 pnpm 版本
local pnpmVersionInstalled=$(pnpm --version 2>/dev/null)
if [[ $pnpmVersionInstalled =~ ^$majorVersionRequired ]]; then
echo "已安装的 pnpm 版本:$pnpmVersionInstalled"
echo "已安装的 pnpm 大版本号符合要求."

View File

@@ -7,4 +7,7 @@
*/
const {execShell} = require('./.exec');
(async () => await execShell('npm run build:mark-map && vuepress dev docs'))()
(async () => await execShell([
'npm run build:mark-map',
'vuepress dev docs'
]))()