feat: 完成70%全局样式与可读性优化

This commit is contained in:
rain
2026-07-31 11:27:15 +08:00
parent 96524e4d6c
commit 555aa00043
116 changed files with 1928 additions and 1169 deletions
+28
View File
@@ -0,0 +1,28 @@
$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $PSScriptRoot
$sourceFiles = @(
(Get-ChildItem -LiteralPath (Join-Path $root 'pages') -Recurse -File -Include *.vue),
(Get-ChildItem -LiteralPath (Join-Path $root 'components') -Recurse -File -Include *.vue),
(Get-ChildItem -LiteralPath (Join-Path $root 'styles') -Recurse -File -Include *.scss),
(Get-Item -LiteralPath (Join-Path $root 'App.vue'))
)
foreach ($file in $sourceFiles) {
$content = Get-Content -LiteralPath $file.FullName -Raw -Encoding UTF8
if ($content -match 'font-size\s*:\s*\d+rpx') {
throw "Fixed rpx font size remains: $($file.FullName)"
}
if ($content -match 'readable-font|readable-line-height') {
throw "Sass typography helper remains: $($file.FullName)"
}
}
$allSource = ($sourceFiles | ForEach-Object {
Get-Content -LiteralPath $_.FullName -Raw -Encoding UTF8
}) -join "`n"
if ($allSource -notmatch 'clamp\(\d+px,\s*\d+rpx,\s*\d+px\)') {
throw 'Responsive clamp typography rule missing from app source'
}
Write-Output 'READABLE-FONT-CONTRACT PASS'