Introduction
This library is under active development and is not ready to be used yet.
This is an experiment!
It's a way to see if it's possible to use Svelte web components from Python without a build step.
Why?
I am currently very happy with fastapi, jinja2 and htmx for building web applications.
But I was needing a way to build small but rich web components.
I had try svelte in the past, and I was very impressed by the reactivity and the simplicity of the components.
The problem was that I don't to add a build step to my projects.
What if there was a way to just write
.sveltefiles and import them in html like.jsfiles?
How?
What happens on installation?
When you run pip install svelte-web-components it will do the following:
- Download
nodein~/.svelte-web-components/node - Copy a base project in
~/.svelte-web-components/svete_app - Install
svelteandvitein~/.svelte-web-components/svete_appcreatingnode_modules
What happens at runtime?
When you run initiate Bundle or SvelteFiles instances, it will:
- Copy the all the
.sveltefiles from the folder you specify in
~/.svelte-web-components/svete_app/components - Run
vite buildin~/.svelte-web-components/svete_appto build the components - Save in memory the generated bundles for fast access in the future