shadcn-vue
shadcn-vue copied to clipboard
[Feature]: Preprocess and host JS components
Describe the feature
Similar to what has been made on shadcn-svelte (https://github.com/huntabyte/shadcn-svelte/pull/715), it would be great to create a "server-hosted" version of the components, available from a registry endpoint (/registry/styles/xxx-js/component.json).
This would help for 2 things: avoid additional client-side computing for each JS component downloaded, as well as unlock that JS-components feature for my shadcn IntelliJ plugin. (Transpiling Vue TS files from a Java-like codebase is not an easy task, and i would prefer avoiding that heavy task for the Vue shadcn port only)
It shouldn’t require much work here as it’s pretty much a copy-paste from the Svelte version. What do you think about it?
Additional information
- [ ] I intend to submit a PR for this feature.
- [ ] I have already implemented and/or tested this feature.
Instead of adding yet another sets of registry, I think we can try a different approach. I'm thinking of a js branch, that would deploy already transformed js registry.
When ci detects new changes to registry files in the dev branch, it will create a PR with the updated js code.
We can simply updates which registry url to hit for the CLI based on user config.
WDYT @sadeghbarati ?
That would be great 💯
Instead of adding yet another sets of
registry, I think we can try a different approach.
Why creating a branch/(auto-)PR mechanism when you could simply update the build_registry.ts file? Seems a lot of work for a same end to me 🤔
The reason im suggesting above is that there's tooooo many files inside the current repo now. It makes navigation harder, and might put heavy loads on vscode when developing. 😂
The reason im suggesting above is that there's tooooo many files inside the current repo now.
As long as it ends up making JS files available through an endpoint, I'm fine with any method!