Files
lucide/scripts/optimizeStagedSvgs.mts
Jeremy Venegas ffff78a02f fix(scripts): correct import extension in optimizeStagedSvgs.mts (#4185)
The import references `processSvg.mjs` but the file is
`processSvg.mts`. This was missed in 4dda4324 when the
lint-staged config was updated to call `.mts` files directly.

The broken import causes the pre-commit hook to fail for any
commit that includes SVG changes, blocking external contributors
from committing locally.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 09:08:14 +01:00

12 lines
356 B
TypeScript

import fs from 'fs';
import processSvg from './render/processSvg.mts';
const svgFiles = process.argv.slice(2);
svgFiles.forEach(async (svgFile) => {
console.log('Optimizing staged SVG file:', svgFile);
const content = fs.readFileSync(svgFile, 'utf-8');
const svg = await processSvg(content, svgFile);
fs.writeFileSync(svgFile, svg, 'utf-8');
});