All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 23s
Build & Deploy / 🧪 QA (push) Successful in 2m1s
Build & Deploy / 🏗️ Build (push) Successful in 7m43s
Build & Deploy / 🚀 Deploy (push) Successful in 26s
Build & Deploy / 🧪 Smoke Test (push) Successful in 1m10s
Build & Deploy / ⚡ Lighthouse (push) Successful in 3m20s
Build & Deploy / 🔔 Notify (push) Successful in 2s
22 lines
1.1 KiB
JavaScript
22 lines
1.1 KiB
JavaScript
const fs = require('fs');
|
|
const files = [
|
|
'/Users/marcmintel/Projects/klz-2026/components/Header.tsx',
|
|
'/Users/marcmintel/Projects/klz-2026/components/Scribble.tsx',
|
|
'/Users/marcmintel/Projects/klz-2026/components/Lightbox.tsx',
|
|
'/Users/marcmintel/Projects/klz-2026/components/record-mode/RecordModeOverlay.tsx',
|
|
'/Users/marcmintel/Projects/klz-2026/components/record-mode/PlaybackCursor.tsx'
|
|
];
|
|
|
|
for (const file of files) {
|
|
let content = fs.readFileSync(file, 'utf8');
|
|
content = content.replace(/import { motion } from 'framer-motion';/g, "import { m, LazyMotion, domAnimation } from 'framer-motion';");
|
|
content = content.replace(/import { motion, Variants } from 'framer-motion';/g, "import { m, LazyMotion, domAnimation, Variants } from 'framer-motion';");
|
|
content = content.replace(/import { motion, AnimatePresence } from 'framer-motion';/g, "import { m, LazyMotion, domAnimation, AnimatePresence } from 'framer-motion';");
|
|
|
|
content = content.replace(/<motion\./g, '<m.');
|
|
content = content.replace(/<\/motion\./g, '</m.');
|
|
|
|
fs.writeFileSync(file, content);
|
|
}
|
|
console.log('Replaced motion with m in ' + files.length + ' files');
|