33 lines
923 B
JavaScript
33 lines
923 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const dir = path.join(__dirname, 'app/src/pages');
|
|
const filesToUpdate = [
|
|
'CylinderModule.tsx',
|
|
'DomeModule.tsx',
|
|
'VaultModule.tsx',
|
|
'BridgeModule.tsx',
|
|
'BarSelectorModule.tsx',
|
|
'TowerModule.tsx'
|
|
];
|
|
|
|
let updated = 0;
|
|
for (const file of filesToUpdate) {
|
|
const filePath = path.join(dir, file);
|
|
if (!fs.existsSync(filePath)) continue;
|
|
|
|
let content = fs.readFileSync(filePath, 'utf8');
|
|
|
|
const target = 'variant="secondary" className="bg-background/80 backdrop-blur-sm"';
|
|
const replacement = 'variant="secondary" className="bg-background/80 text-foreground border border-border/50 backdrop-blur-sm shadow-sm"';
|
|
|
|
if (content.includes(target)) {
|
|
content = content.split(target).join(replacement);
|
|
fs.writeFileSync(filePath, content);
|
|
console.log(`Updated ${file}`);
|
|
updated++;
|
|
}
|
|
}
|
|
|
|
console.log(`Total updated: ${updated}`);
|