Files
lambada-fiesta-live/update_animations.mjs
Antoni Nuñez Romeu 3c1ae1643b Adding animations
2026-03-19 16:48:42 +01:00

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}`);
}
}