mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 20:57:43 +01:00
* Update `svgo` and `svgson` version and fix some tests * Update eslint-related packages and fix all linter errors * Update all rollup-related packages version * Update all rollup-related packages (part 2) * Update the rest of package which need to be updated * Fix unwanted comment * Fix unwanted comment (again)
16 lines
479 B
JavaScript
16 lines
479 B
JavaScript
import fs from 'fs';
|
|
import path from 'path';
|
|
import processSvg from './render/processSvg.mjs';
|
|
import { readSvgDirectory, writeSvgFile } from './helpers.mjs';
|
|
|
|
const ICONS_DIR = path.resolve(process.cwd(), 'icons');
|
|
|
|
console.log(`Optimizing SVGs...`);
|
|
|
|
const svgFiles = readSvgDirectory(ICONS_DIR);
|
|
|
|
svgFiles.forEach((svgFile) => {
|
|
const content = fs.readFileSync(path.join(ICONS_DIR, svgFile));
|
|
processSvg(content).then((svg) => writeSvgFile(svgFile, ICONS_DIR, svg));
|
|
});
|