-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: Add jsrepo #64
feat: Add jsrepo #64
Conversation
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
@shyakadavis any thoughts on this? If we decided what to do I can try and implement it today! |
Hey, @ieedan I think I like the idea of installing all icons at once (If this is terrible, I am open to the alternative.) Here is my only reason; you know how Vite tries to optimize everything on the first page visit? When all icons are bundled and optimized, you can navigate to other pages without Vite trying to re-load and re-optimize on each visit. (It's done all at once; does that make sense?) |
Yeah I have seen this with lucide it's super annoying! |
Another problem that comes up with this is because many components will depend on every icon jsrepo will ask if you want to overwrite every icon almost every time you add a single component and that's pretty annoying. Either way give it a try and let me know what you think! |
These pop up in my project when I install
I guess a way around the annoying prompts for every icons is to just hold Playing around with this adding some of the components to the projects works really good outside of the icons thing. Just need to add some instruction for the other config files I think! |
Also I relocated theme-switcher so that you can actually install it |
Full demo: https://github.com/ieedan/geist-jsrepo |
Okay no. 2 should be fixed in |
I do think before we merge this we have to work on the instructions though. I have pretty detailed instructions in the demo README so maybe look there and let me know what you think? |
It should be: Tip tip |
> [!TIP]
> tip |
Yeah the tip is being a little b*tch |
I thought it might of been line wrapping so I had claude shorten the tip but it didn't seem to make a difference |
@shyakadavis So I think it's a bug with github markdown rendering. The rendering is different on PR previews for whatever reason. I just pasted this into the demo and it worked perfectly. |
I think this is ready though unless you have any other issues that should be addressed first! |
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.
Thank you very much, @ieedan You're awesome.
Likewise my friend |
I am opening this up as a draft so we can discuss it.
This currently works in this state and you can test it by running:
We have to include
utils
andicons
in the build so that we have all local dependencies covered but I have opted to not list them when users add blocks.The problem that I want to discuss is icons...
With the current way that we do icons everything is imported into a index.ts file and then rexported to be used everywhere else. This does work, but because of this you have to install every icon even if you are only going to use 1.
So with that explained there are a few options:
.svelte
file and import each icon individually.I don't think this really makes any sense to merge unless we make a change so that not every icon is installed for every component.
Edit: After ieedan/jsrepo#244 the time it takes to actually install isn't that bad but I would still find it annoying that every icon is installed in my repo after installing
Avatar
.