mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-23 02:59:21 +01:00
lucide-static (#401)
* Add lucide static * add render files * add read scripts * Add sprite generator * start with documentation * Add docs * adding documentation * fix build command * Add some extra static files * bump version * Update packages/lucide-static/README.md Co-authored-by: Kathryn Reeve <67553+BinaryKitten@users.noreply.github.com> * Fix sprite generation * update readme * Add lucide static workflow * adjust readme * Add font to release yml * Temporary turn of new versioning for lucide-static Co-authored-by: Kathryn Reeve <67553+BinaryKitten@users.noreply.github.com>
This commit is contained in:
13
packages/lucide-static/scripts/generateIconNodes.js
Normal file
13
packages/lucide-static/scripts/generateIconNodes.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { writeFile } from '../../../scripts/helpers';
|
||||
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user