mirror of
https://github.com/Ichitux/lambada-fiesta-live.git
synced 2026-05-15 21:12:20 +02:00
16 lines
510 B
JavaScript
16 lines
510 B
JavaScript
import fs from 'fs';
|
|
import path from 'path';
|
|
|
|
const dir = 'src/components';
|
|
const files = fs.readdirSync(dir).filter(f => f.endsWith('.tsx'));
|
|
|
|
for (const file of files) {
|
|
const filePath = path.join(dir, file);
|
|
let content = fs.readFileSync(filePath, 'utf8');
|
|
if (content.includes('viewport={{ once: true }}')) {
|
|
content = content.replaceAll('viewport={{ once: true }}', 'viewport={{ once: false, amount: 0.15 }}');
|
|
fs.writeFileSync(filePath, content);
|
|
console.log(`Updated ${file}`);
|
|
}
|
|
}
|