mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-17 00:37:42 +01:00
* 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
14 lines
447 B
JavaScript
14 lines
447 B
JavaScript
import { writeFile } from '../../../scripts/helpers.mjs';
|
|
|
|
export default function generateIconNodes(parsedSvgs, packageDir) {
|
|
const iconNodes = parsedSvgs.reduce((acc, { name, parsedSvg }) => {
|
|
acc[name] = parsedSvg.children.map(({ name, attributes }) => [name, attributes]);
|
|
|
|
return acc;
|
|
}, {});
|
|
|
|
const iconNodesStringified = JSON.stringify(iconNodes, null, 2);
|
|
|
|
writeFile(iconNodesStringified, 'icon-nodes.json', packageDir);
|
|
}
|