mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 17:57:43 +01:00
* testing * Fixes pre-commit hook * Removing checkIcons from pre commit hook because it might result in false positives and negatives on an unclean local repository * Added checkIcons Github action --------- Co-authored-by: Karsa <karsa@karsa.org>
16 lines
488 B
JavaScript
16 lines
488 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, svgFile).then((svg) => writeSvgFile(svgFile, ICONS_DIR, svg));
|
|
});
|