refactor(web): unify tokens and product copy
This commit is contained in:
@@ -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')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user