Replies: 1 comment
-
I was kinda thinking that the CLI needs something like that. In some way to be extensible like adding custom path aliases that may be picked up by the target property. Something like: {
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
...
"aliases": {
...
"custom": "@/custom",
}
} And then in the registry.json of custom registries we can use it like the following: {
"$schema": "https://ui.shadcn.com/schema/registry.json",
...
"items": [
{
"name": "my-complex-stuffs",
"type": "registry:block",
...
"files": [
{
"path": "registry/default/ultra/complex/component.tsx",
"type": "registry:block",
"target": "#custom/component.tsx"
},
...
]
}
]
} Things to note in the latest target it could be used I think this way it could be a more nice experience for developers on both sides. |
Beta Was this translation helpful? Give feedback.
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.
Uh oh!
There was an error while loading. Please reload this page.
-
We are hosting our own shadcn components over at React Flow, which arguably is a little different from other general purpose components built with the shadcn cli. (it sometimes requires an additional step after installing the package to wire it up with React Flow or use it in the correct context).
Anyway, working in a bigger project with all kinds of shadcn and React Flow components, things get cluttered pretty fast as everything added through the
shadcn add
just lands (more or less) in the same folder. I saw that there is a target property but it get's only respected for files and pages...It would be cool to just define a folder where components from a specific registry end up in. Even cooler would be the ability to define aliases in the components.json for certain registries.
Beta Was this translation helpful? Give feedback.
All reactions