-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
WIP: jsrepo v3 #684
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
base: main
Are you sure you want to change the base?
WIP: jsrepo v3 #684
Conversation
|
Hey Aidan, I still think keeping all 4 variants separate is preferred in my case here. Also, why were all the registry items deleted? |
|
Also, I really don't want to hold a meta.json file in the src folder for every single component, is that mandatory? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The registry.json files have to stay, they are used by shadcn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still generate the registry json files they just aren't tracked rn. Can ofc add them back for visibility though.
To follow up on this, removing these will cause this command to stop working, which is not what I want: |
|
All the registry items were removed cause there's not really any reason to track them on GitHub they are automatically added when you deploy the site. |
Nope just a possible alternative to having to define a huge file with all the descriptions of every item it's completely up to you It just allows us to autobuild without defining every registry item and still add metadata to each item. All the code for that is contained in the jsrepo.config.ts and not part of jsrepo itself. |
I'm a fan of huge files... better to have one file to manage everything, like |
|
I just don't think this really simplifies anything... I'm a lot more confused with what's going on now rather than the previous setup |
Yeah we can go back to that for now |
A demo of what the registry could look like with jsrepo v3 opening this now so we can fix anything in jsrepo that would be a limitation here.
Here's how it works right now...
With jsrepo v3 outputs we can now output jsrepo and shadcn registries all with one command
jsrepo build.Since it's a js based config we can also do our own ultra specific build scripts if we'd like. In this case we do this with the
getItemsfunction:Get items automatically compiles all the items in the registry based on the structure of the repo using the
meta.jsonfile to get the description of each component. (We can of course add other meta data here as necessary)Dropping JS variants in favor of automatic type stripping at runtime
Since both jsrepo and shadcn support automatic TS -> JS conversion we have dropped the js variants of the registry.
Support for js in shadcn:
Support for js in jsrepo:
Users can initialize your registry with js by running:
The final product looks like this:
Tasks before this would merge: