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

[Feature]: Preprocess and host JS components #378

Open
2 tasks
WarningImHack3r opened this issue Mar 4, 2024 · 5 comments
Open
2 tasks

[Feature]: Preprocess and host JS components #378

WarningImHack3r opened this issue Mar 4, 2024 · 5 comments

Comments

@WarningImHack3r
Copy link
Contributor

Describe the feature

Similar to what has been made on shadcn-svelte (huntabyte/shadcn-svelte#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.
@WarningImHack3r WarningImHack3r changed the title Preprocess and host JS components [Feature]: Preprocess and host JS components Mar 4, 2024
@zernonia
Copy link
Member

zernonia commented Mar 5, 2024

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 ?

@sadeghbarati
Copy link
Collaborator

sadeghbarati commented Mar 5, 2024

That would be great 💯

@WarningImHack3r
Copy link
Contributor Author

WarningImHack3r commented Mar 5, 2024

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 🤔

@zernonia
Copy link
Member

zernonia commented Mar 6, 2024

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. 😂

@WarningImHack3r
Copy link
Contributor Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants