mirror of
https://github.com/Ichitux/lambada-fiesta-live.git
synced 2026-05-15 18:52:20 +02:00
Adding animations
This commit is contained in:
15
update_animations.mjs
Normal file
15
update_animations.mjs
Normal file
@@ -0,0 +1,15 @@
|
||||
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}`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user