Hacker News new | ask | show | jobs
by jscheel 4844 days ago
It can get pretty messy at times.
1 comments

Try https://github.com/mgutz/funcd. It's straight up CoffeeScript functions patterned after Markaby, Erector. Other CoffeeScript templates we tried did funky things with the context and closures didn't work as expected.

And when performance is a concern, you can't beat string interpolation within CoffeeScript heredoc strings.

Yep, that's usually how I start my render() method (using triple-quote strings). Then I wrap it in jquery and do dom manipulation on it.
Why can't people just use regular HTML for markup? Coffeescript is beautiful when you are composing short succinct functions but this just looks like more work for my brain.
I used coffeekup back in the day, but I just can't stand the jade-style declarative html. I also used eco for a while, but it got pretty messy too. I'm picky, I know :)