You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature already exists in shadcn/ui - if not, it won't be considered here so don't continue with your issue.
Describe the feature
When setting the components and utils path (alias), the results are different. Let's say I want to put all shadcn-svelte/ui components under $lib/components/shad so that a project has a path to the shadcn e.g. Button: $lib/components/shad/ui/Button.svelte, it works when running the cli interactively but not when you use the --components-alias feature. It will fail stating that the path doesn't exist.
The utils path behaves completely different. When I run cli interactively, and change the default: $lib/components/utils to something like $lib/utils/shad, it will work and put a shadcn utils file in $lib/utils/shad.ts. I'm not sure why it does it like that, but I can accept it. However, if I use the same path using the --utils-alias $lib/utils/shad switch, it fails with an error stating that the alias in not defined in tsconfig.js. Why does it work interactively but not when you use the switch? I guess I'm a bit confused by these 2 switches. I'm assuming that they just point to where I want shadcn cli to put components and utils, because it definitely generates files in those locations. When using interactively, it creates a shad.ts file under $lib/utils. Strange behavior but maybe my lack of understanding
The text was updated successfully, but these errors were encountered:
Prerequisites
Describe the feature
When setting the components and utils path (alias), the results are different. Let's say I want to put all shadcn-svelte/ui components under $lib/components/shad so that a project has a path to the shadcn e.g. Button: $lib/components/shad/ui/Button.svelte, it works when running the cli interactively but not when you use the --components-alias feature. It will fail stating that the path doesn't exist.
The utils path behaves completely different. When I run cli interactively, and change the default: $lib/components/utils to something like $lib/utils/shad, it will work and put a shadcn utils file in $lib/utils/shad.ts. I'm not sure why it does it like that, but I can accept it. However, if I use the same path using the --utils-alias $lib/utils/shad switch, it fails with an error stating that the alias in not defined in tsconfig.js. Why does it work interactively but not when you use the switch? I guess I'm a bit confused by these 2 switches. I'm assuming that they just point to where I want shadcn cli to put components and utils, because it definitely generates files in those locations. When using interactively, it creates a shad.ts file under $lib/utils. Strange behavior but maybe my lack of understanding
The text was updated successfully, but these errors were encountered: