luwes/sinuous

Handlebars helpers for Sinuous

luwes opened this issue · 2 comments

luwes commented

Kind of curious what would be needed to make this work.
It would be a compiler only, at runtime it would be too slow and heavy.

A handlebars to hyperscript compiler?
Hyperbars looks promising, https://github.com/vincentracine/hyperbars

Additional useful info on the topic here: adamhaile/surplus#26

luwes commented

Started a new package here (https://github.com/luwes/hyperstache) with a lightweight handlebars runtime covering the basic handlebars logic. A handle bars to template literals Babel plugin is still todo.

luwes commented

A little follow up on Hyperstache, it's in a good shape now I believe.

The only thing that is left to make it work seamlessly with Sinuous is to write custom helpers that would add the right mappings. For example each would have to call the Sinuous map module for rendering lists. Also the variable expressions would need to be expanded to observables wrapped in a closure to make everything reactive.

Gonna leave this work until there is actually need for it.