canjs / can-stache

Live binding handlebars templates
https://canjs.com/doc/can-stache.html
MIT License
10 stars 13 forks source link

Make can-stache render able without dom none live binding version #727

Open frank-dspeed opened 4 years ago

frank-dspeed commented 4 years ago

can-stache at present allways applys livebindings it parses the string representation into a dom object to apply the bindings.

It would be really great if can-stache could be used like handlebars and only do livebindings and dom parsing and all that only in a browser environment.

maybe split all browser binding parts into a extra optional module.

justinbmeyer commented 4 years ago

I think there's another ticket to do something similar. I'll try to find it.

frank-dspeed commented 4 years ago

the size and bloat tickets from canjs and can-element are maybe related.as the dom and other binding parts take much code space.

as a workaround i am experimenting with template literals forking all existing canjs examples and do the binding via some self crafted helpers.

it works really well i think maybe even can-stache can be deprecated as your able to run functions inside template literals and also do if then else and the nativ js stuff.