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