mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-13 13:48:26 +00:00
* cleanup scripts * Move helpers to package * Fixes scripts * Fix scripts * Formatting * Fix helpers import paths * Remove lucide-figma * Rename helpers package * Fix build * formatting * Adjust main build-icons file * Add export casing * Adds `exportModuleNameCasing` fro lab project * format files * Bump package version @lucide/build-icons * Revert changes in icons * Revert changes in PR yml * Fix lint issues * Fix site build * fix lint errors * Attempt fix linting * Fix lint errors
16 lines
490 B
JavaScript
16 lines
490 B
JavaScript
import fs from 'fs';
|
|
import path from 'path';
|
|
import { readSvgDirectory, writeSvgFile } from '@lucide/helpers';
|
|
import processSvg from './render/processSvg.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, svgFile).then((svg) => writeSvgFile(svgFile, ICONS_DIR, svg));
|
|
});
|