Align ~
alias to components.json
in custom registries
#6748
iloveitaly
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I love the new custom registry functionality. I've been getting it working with this project:
nainglinnkhant/lingua-time#3
One of the issues I've run into is
~
does not represent the same path as what is defined in the components JSON.For instance:
~/web/app
folder when used in atsx
(as defined bycomponents.json
)registry.json
the~
seems to reference the root level folder, i.e. the~/web
folder in this case.This means in order to get the components to clone into the
~/app/components
folder, I need to hard code theapp
sub-directory in thetarget
field on the registry JSON. This doesn't work because not all projects will use theapp
folder. Some usesrc
, etc.It would be great if:
app/
as the~
(as defined in the components + tsconfig)~
path on a per-command basis (shadcn add --clone=use/this/dir
). One use case here is having a dedicated folder for all non-official components that you're cloning:shadcn add --clone=app/components/vendor
Beta Was this translation helpful? Give feedback.
All reactions