|
|
|
|
|
by simonw
813 days ago
|
|
This looks really cool, but I'm going to use it as a quick illustration of a pet peeve. The README says this: <script>
import ZoomableCircles from "svelte-zoomable-circles";
</script>
<ZoomableCircles tree={treeObject} />
That's not enough information for me to use this thing!As an infrequent user of JavaScript libraries it's now on me to figure out which of the various bundlers (WebPack? Vite? esbuild? Some other thing?) are in-vogue right now, then work out the incantations needed to get the above syntax converted into code that actually runs in a browser. I made extensive notes on this the other day when I tried to get quickjs-emscripten to work - I really wish I didn't have to jump through so many hoops every time I want to try something out new in npm land: https://til.simonwillison.net/npm/self-hosted-quickjs |
|
You’re right, I kind of let the fact that “svelte” is in the name do too much of the work for me - this is specifically a Svelte component. I’ll add that fact to the readme. As for bundler, Vite is preferred but you should be able to use any.
As others have noted, this is a relatively thin wrapper over D3 code. Based on this and other feedback, I might go ahead and make this into a web component so that it’s completely framework-agnostic.