-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
[ FEATURE ] Automate Lucide Icon additions #202
Comments
This would be great! I am also having some troubles with auto imports from the icon exports, have you had any issues with that? |
Check this out #198, replace lucide with iconify and only one export needed. Iconify includes lucide and so much more https://icon-sets.iconify.design/ |
I am open to this. It will need to be another command than "add" since there are some conflicts between the components and the lucide-icon names. |
another suggestion: instead of creating separate files for each icons, create a single icons.tsx and increment the icons there. For example:
after that just This way the codebase will remain neat. |
@helix-77 That's how it was at first, the problem I faced was with the CLI when adding icons. It would need to parse the file to see if the icon is already there, add text in 3 places, and if the user manually changed something it could stop working so it was easier to add a file for each icon. React-native-reusables is meant as a quick start for your projects and it is encouraged that you make any changes you need. So, by all means, modify your the icons in your codebase to look like your suggestion. |
We can maybe utilise component.json here by adding an 'icons' field and then on each run we can just check that key and regenerate whole file without needing to parse it. |
sorry for falling off the deep end @mrzachnugent. I'm still interested in tackling this and I'll start working something up. |
Is your feature request related to a problem? Please describe.
To remove a bit of the leg work of adding a new icon it would nice if part of the CLI was essentially a helper that takes the Icon name and creates the necessary
lib/icons/*.ts
file with the wrapped export.Describe the solution you'd like
Add a new
icon
command alongsideadd
which takes Lucid icon names as an argument and creates the necessary .ts file.Describe alternatives you've considered
Currently using a script like this to automate the creation
Additional context
I've always been interested in creating a node based CLI script and would be happy to tackle this addition if that would be OK.
The text was updated successfully, but these errors were encountered: