Skip to content

CoffeeKup as "helpers language" #27

clyfe opened this Issue Jul 20, 2011 · 0 comments

1 participant

clyfe commented Jul 20, 2011

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.

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) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.