318c024589
* add pnpm * make it work * fix comamnds in package.jsons * move some scripts to modules * workflow fixes * test workflow * test #2 * minor fix * update lockflite * create workflows * update workflow * Add copy license command * Fix build * update workflows * update contributions.md * migrate site directory to pnpm * Fix peer dependencies when install * fix types in lucide-angular * fix testing
16 lines
475 B
JavaScript
16 lines
475 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));
|
|
});
|