I made a script to clean up imports and automate some stuff. Isn't this a decent idea? #2615
remcostoeten
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So, I've created this (not done/perfect but works for most components): https://github.com/remcostoeten/shadcn-ui-lazymans-auto-importer
It's a JS + Shell script that allows you to type ./shellscript.sh component name, which then does the equivalent of bunx --bun shadcn-ui@latest add component name. Besides that, it also creates a ui-imports.tsx file which imports the downloaded component and exports it, allowing you to do this in any component.
import { Input, Progress, NavigationMenu, yadadada } from '@/components/ui/ui-imports';
In my projects where I've started using it, it cleans up components since it prevents having a huge list of UI imports. Nothing special, but in my opinion, a good addition.
Tooltip
but notTooltipProvider
Beta Was this translation helpful? Give feedback.
All reactions