[Question] Why does add ignore directory paths from external registries? #8286
Unanswered
programming-with-ia
asked this question in
Q&A
Replies: 1 comment
|
For a permanent fix, the registry item should provide an alias-aware {
"path": "registry/magicui/my-component.tsx",
"type": "registry:ui",
"target": "@ui/magicui/my-component.tsx"
}
If you only consume the registry and cannot change its JSON, override the destination when adding it: npx shadcn@latest add @magicui/my-component \
--path src/components/ui/magicui \
--dry-runRemove |
0 replies
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.
When I use the
shadcn-uiadd command to install a component from a custom registry (like Magic UI), the tool seems to ignore the directory structure defined in the component's JSON.For example, a component with
path: "registry/magicui/my-component.tsx"gets installed atsrc/components/ui/my-component.tsx, instead ofsrc/components/ui/magicui/my-component.tsx.Is there a way to make the add command respect the directory path and create subfolders for external components? This would help keep my component library organized.
All reactions