I'd like to augment Eco, so that when a function object is given to output like so
<%- -> div class: 'big' %>
or even nicer
<%-> div class: 'big' %>
This function to be passed to the coffeekup compiler, if present.
This way, coffeekup becomes a nice DSL for view helpers.
Maybe have some API to plug different resolvers to different tags <%= <%- <%-> <%=> <%+> etc. ?
At the moment I know I can do
ck = coffeekup.compile
...
<%-ck -> div class: 'big' %>
But I'm mostly thinking at the zen of it.
PS.
Is Eco stream-able ? meaning does it "send" the resolved chunks of the template before the rest of the template is processed (like the recent Rails streaming additions) ?
I'd like to augment Eco, so that when a function object is given to output like so
or even nicer
This function to be passed to the coffeekup compiler, if present. This way, coffeekup becomes a nice DSL for view helpers. Maybe have some API to plug different resolvers to different tags <%= <%- <%-> <%=> <%+> etc. ?
At the moment I know I can do
But I'm mostly thinking at the zen of it.
PS. Is Eco stream-able ? meaning does it "send" the resolved chunks of the template before the rest of the template is processed (like the recent Rails streaming additions) ?