Replies: 1 comment
-
Matcha looks very cool, it appears the module it produces ultimately renders a string/string builder, which would only be compatible with the sprocket So we would have to implement our own generator/transpiler, possibly using matcha as an example reference for how to generate gleam modules. I think this would make sense to do for html single file components in sprocket as long as this functionality is opt-in, ideally as an add-on library. Maybe we can add a configuration parameter to core to specify a template engine that, if specified, will run before the render stage so that anyone willing to write one, can create a template engine of their choice (svelte, vue, jsx, heex, etc..) |
Beta Was this translation helpful? Give feedback.
-
https://github.com/michaeljones/matcha.
This produces gleam files from template files.
Maybe we could experiment with these kinds of things for single file components similar to vue/svelte.
I think the core could be kept clean and this would be an addon, with type completions/stuff for vs code.
Maybe even re-use vue/svelte syntax
I've always wanted to figure out how those files convert back into the h render functions.
But i've never done anything like that.
Beta Was this translation helpful? Give feedback.
All reactions