-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added @compile #2
Conversation
Is this only for replacing How about simply delegating
|
The use case was more for reusable compiled template functions. I really wanted to do something like this:
It's really just a question of syntax though. Abstracting out the compilation and removing the magic
with
instead of
I don't consider Edit: Sorry, forgot the binding in |
Forget that idea; @@ gets overwritten in every block, so it has to be a special variable.
Replace |
I really don't like the I was really looking for the same sort of usage as CoffeeKup but with Coco's beautiful extensions, but both CoffeeKup and ck keep more state and manipulate |
You should ideally be passing a function for dynamic rendering. (The
Though I understand the need for compiling to the
Maybe importing the context object into the instance works? How about:
Then you'd be able to:
|
I added a
compile
function that compiles a Coco template string into a function to be called with acontext
:ckup
is included withwith
, and ifcontext
isn't specified then it defaults tockup
, so these should all be equivalent:The only incompatibility should be if you combine
@
andcontext
: