Files
Neo-ZQYY/apps/miniprogram/scripts/inspect-wechat-font.ps1
Neo b44096600d chore(cleanup): 清理历史会话遗留未跟踪产物 — gitignore 追加 + 文件归位
- .gitignore: 追加 .playwright-mcp/ 与 apps/miniprogram/.font_patch_tmp/ 两条忽略规则
- apps/miniprogram/scripts/: 新建目录, 迁入 TDesign BOM 修复脚本 inspect-wechat-font.ps1 及其检查报告
- 根目录 excel_analysis_report.txt / sheet_structure.txt 归位 tmp/, 修正 root-file 风险标签
- 审计记录 2026-04-20__legacy-untracked-cleanup-review.md, 含实际执行段与回滚路径
- audit_dashboard.md 由 gen_audit_dashboard.py 刷新至 130 条

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 06:48:27 +08:00

32 lines
884 B
PowerShell

$ErrorActionPreference = "Stop"
function Write-NoBomFile {
param(
[string]$Path
)
if (!(Test-Path $Path)) {
Write-Host "SKIP: $Path (not found)"
return
}
$fullPath = (Resolve-Path $Path).Path
Write-Host "PROCESS: $fullPath"
$content = [System.IO.File]::ReadAllText($fullPath)
# 去掉开头可能混入的 BOM / 零宽字符
$content = $content.TrimStart([char]0xFEFF, [char]0x200B, [char]0x0000)
# 强制写成 UTF-8 without BOM
$utf8NoBom = New-Object System.Text.UTF8Encoding($false)
[System.IO.File]::WriteAllText($fullPath, $content, $utf8NoBom)
Write-Host " Rewritten as UTF-8 without BOM."
}
Write-NoBomFile ".\miniprogram\miniprogram_npm\tdesign-miniprogram\icon\icon.wxss"
Write-NoBomFile ".\node_modules\tdesign-miniprogram\miniprogram_dist\icon\icon.wxss"
Write-Host ""
Write-Host "DONE"