Skythread rewrite status
I didn't expect to be pretty excited again about writing JavaScript, of all things, but here we areβ¦ π
It's been about a month and a half now since I started thinking again and doing research about rewriting Skythread from vanilla JS to some kind of framework:
I picked Svelte in the end and decided to rewrite the app in it. I'll write more about the reasons and my impressions later (spoiler: it's cool!), this is just a status update β after a bit over a month of coding and around 140 commits, I'm more or less finished with the rewrite.
You can see the final version of the code here on the svelte branch:
https://tangled.org/mackuba.eu/skythread/tree/svelte/src External Link β’ tangled.orgI got rid of all of the code touching DOM modification APIs like createElement/appendChild/innerHTML etc., everything inside index.html <body>, and most of the style.css β all of the UI-touching code is now in *.svelte component files. I also converted all previous classic scripts to ESM modules, set up bundling (using Bun), and split various files into smaller ones (which was a bit inconvenient before without a build step). Finally, I also converted most of the code from types in JSDoc comments to full TypeScript; I found it a bit too annoying previously with all the DOM access API calls sprinkled everywhere, but with that all gone, it was much simpler now.
I haven't merged it all into master yet, because I want to test everything a bit more in practice; I've deployed this version to a separate address, skythread.mackuba.eu, while the stable version is still deployed at blue.mackuba.eu/skythread. I intend this to be the new official address, and at some point I'll make the old one redirect to the new domain.
I'm pretty happy with how it's all looking now, I think this puts me in a good place to add some new features and improvements to the app easier next year. For now I've already started playing with two things:
A bunch of statistics from the rewrite:
Note: the 184 KB is from a production bundle made with Bun. This can be brought down to:
Discussion in the ATmosphere