-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add icon lib description for lucide-react #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Bump @types/node to ^24.0.15 and add missing React type dependencies - Add build tooling dependencies (@file-services/node, tsx) - Remove unused type dependencies (@types/prop-types, @types/scheduler) - Update lucide-react package build configuration
AviVahl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use conventional commits for PR title.
Add PR description.
the problem with the .json approach is that it is untyped, so when the package user imports it, everything is loose and could easily break with future changes of this package.
|
|
||
| const svgsByContent = new Map<string, IconData>(); | ||
|
|
||
| for (const [exportName, IconComponent] of Object.entries(lucideReact)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lucide-react exports the same icon 3 times:
- Speaker
- LucideSpeaker
- SpeakerIcon
So while we could list all 3, we could just list "Speaker", and use the "SpeakerIcon" export (for less code confusion)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could iterate on lucideReact.icons instead to avoid the duplicates
| if (svgsByContent.has(svgString)) { | ||
| const existing = svgsByContent.get(svgString)!; | ||
| // Keep the shortest name | ||
| if (exportName.length < existing.name.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while this works for the Abc/LucideAbc/AbcIcon case, this makes no sense for icons that are being renamed (with the old one kept around)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you suggest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iterate on lucideReact.icons and avoid checking for same-content and aliases.
| }, | ||
| "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { | ||
| "version": "3.4.3", | ||
| "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you've messed up the package-lock.json
this happens if you npm i without a package-lock, but with existing node_modules.
- Remove tsx from root package dependencies and related esbuild packages - Add new build script (do-build.ts) for lucide-react package - Update lucide-react package configuration and README - Add LICENSE file to lucide-react package - Update TypeScript configurations across packages
add a list of icons and a pre-rendered version for lucide-react icons