Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom paths for components/ui #547

Closed
xmlking opened this issue Dec 17, 2023 · 3 comments · May be fixed by #1182
Closed

custom paths for components/ui #547

xmlking opened this issue Dec 17, 2023 · 3 comments · May be fixed by #1182
Labels
type: CLI type: feature Introduction of new functionality to the application

Comments

@xmlking
Copy link

xmlking commented Dec 17, 2023

Describe the feature in detail (code, mocks, or screenshots encouraged)

I am using monorepo and want to control where components get added with cli add command.
this still don't allow changing path for components:ui type

npx shadcn-svelte@latest add -p src/lib/components/shadcn button

Ask: let the users customized where components get added via either CLI args or via components.json

What type of pull request would this be?

None

Provide relevant links or additional information.

apps/myapp <-- `sveltekit app`
libs/ui/ <-- `shared components lib`
        src/lib/components/shadcn
               button
               dropdown-menu
        components.json
@xmlking xmlking added the type: feature Introduction of new functionality to the application label Dec 17, 2023
@Skylli202
Copy link
Contributor

@huntabyte What's your thought on this issue? I think I could take a look at how to solve this.

The CLI could just ask the path, like when the init command ask for the global CSS file. But that would also add an extra step for everyone who is not using such mono-repo (which is the majority of people, no?).

@xmlking It might be a bit dirty, but have you try to move the components.json at the root or your mono-repo? Update the configuration stored in it accordingly? It should do the job.

@xmlking
Copy link
Author

xmlking commented Jan 2, 2024

For reference, Here is my monorepo https://github.com/xmlking/spectacular
Shadcn components are at packages/ui with components.json in it.
Consuming app is at apps/console-sc

@huntabyte
Copy link
Owner

Added in @next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: CLI type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants