style: 移除多个文件末尾的空行并格式化代码

refactor(ci): 统一字符串引号风格为单引号
refactor(color): 简化数组返回语法
docs: 调整文档中的代码注释格式
chore: 添加.gitattributes文件配置行尾符
This commit is contained in:
Linkon
2026-01-18 19:43:26 +08:00
parent 8c48b35c08
commit 24e9e6f6f8
12 changed files with 14 additions and 23 deletions
+1
View File
@@ -0,0 +1 @@
* text=auto eol=lf
+2 -2
View File
@@ -6,10 +6,10 @@ on:
workflow_dispatch:
inputs:
version:
description: "版本号(例如 1.2.3 或 v1.2.3"
description: '版本号(例如 1.2.3 或 v1.2.3'
required: false
build:
description: "构建命令标记(build:win|build:mac|build:linux|build:unpack|build:all"
description: '构建命令标记(build:win|build:mac|build:linux|build:unpack|build:all'
required: false
permissions:
-1
View File
@@ -91,4 +91,3 @@
- 本计划不包含“引入插件系统/插件化框架”的任何概念与实现。
- 本计划不包含“删除 hosting 目录”。它会被保留;仅确保不再作为主路径依赖。
- 本计划优先保证现有功能可用与类型安全,然后再做进一步抽象与模块扩展。
+3 -2
View File
@@ -1,7 +1,9 @@
import fs from 'fs'
import path from 'path'
const version = String(process.argv[2] || '').trim().replace(/^v/i, '')
const version = String(process.argv[2] || '')
.trim()
.replace(/^v/i, '')
if (!version) {
process.stderr.write('缺少版本号参数,例如:node scripts/ci/apply-version.mjs 1.2.3\n')
process.exit(1)
@@ -17,4 +19,3 @@ const pkgPath = path.join(process.cwd(), 'package.json')
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'))
pkg.version = version
fs.writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`, 'utf-8')
-1
View File
@@ -88,4 +88,3 @@ if (process.env.GITHUB_OUTPUT) {
} else {
process.stdout.write(`${JSON.stringify(outputs, null, 2)}\n`)
}
+1 -5
View File
@@ -1,11 +1,7 @@
function hexToRgb(hex: string): [number, number, number] {
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex)
return result
? [
parseInt(result[1], 16),
parseInt(result[2], 16),
parseInt(result[3], 16)
]
? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)]
: [0, 0, 0]
}
-1
View File
@@ -23,4 +23,3 @@
}
}
}
-1
View File
@@ -23,4 +23,3 @@
}
}
}
-1
View File
@@ -23,4 +23,3 @@
}
}
}
-1
View File
@@ -23,4 +23,3 @@
}
}
}
-1
View File
@@ -23,4 +23,3 @@
}
}
}