refactor(web): unify tokens and product copy

This commit is contained in:
2026-07-21 12:51:16 +08:00
parent 48709ea7c4
commit 907caed363
10 changed files with 239 additions and 228 deletions

View File

@@ -25,6 +25,16 @@ const requiredFiles = [
const failures = requiredFiles.filter((file) => !existsSync(file)).map((file) => `missing ${file}`)
const tokenSource = existsSync('src/styles/tokens.css') ? readFileSync('src/styles/tokens.css', 'utf8') : ''
for (const token of ['--color-primary: #165dff', '--font-sans', '--space-4: 16px']) {
if (!tokenSource.toLowerCase().includes(token)) failures.push(`missing token ${token}`)
}
for (const forbidden of ['森林Agent', 'AI智能体', '实时接口', '进度 60%']) {
for (const file of requiredFiles.filter((name) => name.endsWith('.tsx'))) {
if (readFileSync(file, 'utf8').includes(forbidden)) failures.push(`${file} contains forbidden copy ${forbidden}`)
}
}
if (existsSync('src/App.tsx')) {
failures.push('legacy src/App.tsx should be removed after page split')
}