Civet
Civet copied to clipboard
Integrating Svelte?
Svelte is gaining popularity among people who appreciate simplicity and easy composability. Since its functionality is not based on a js import, would you consider making Civet compatible with .svelte components?
I would recommend a syntax like the following:
<script lang="civet"> 'hello world!' |> console.log </script>
Sounds like a great idea! Perhaps we can mimic svelte-add/coffeescript? Or is svelte-add still active / the right approach?
Let us know if you'd like to work on this; it doesn't look too difficult.
We'll need to add support for $: labels too. Should be straightforward.
Looking at Svelte's TypeScript support, the transpilation may be possible now with our existing Vite plugin which should also work as a Rollup plugin. But obviously this needs testing.
Sounds like a great idea! Perhaps we can mimic svelte-add/coffeescript? Or is svelte-add still active / the right approach?
Let us know if you'd like to work on this; it doesn't look too difficult.
Not sure if it is the right approach. But I can experiment with mimicing the svelte-add coffeescript and see what happens.
Great! Feel free to suggest a better approach as well if you find one.
FYI, we've added support for $: to Civet already.
There is a bit learning curve here. My WIP version:
https://github.com/levitabris/svelte-add
Update:
It seems that svelte-add coffee script support is just a wrapper around svelte-proprocess(feel free to correct me if wrong), which implemets the original coffee support for svelte. I'm looking into how it was done in the svelte-preprocess.
BTW, the svelte-preprocess seems to be straight forward to config itself🦦
@levitabris Have you taken a look at our new Rollup and Vite plugins? https://github.com/DanielXMoore/Civet/tree/main/integration/unplugin/examples please try them out and let us know if you have any questions or encounter any errors, thanks!