Skip to content

Comment on Emblem.js: concise, indented alternative templating language for Handlebars.js

Comments

    a concise, beautiful, and fully compatible templating alternative for Handlebars.js"
    [...]
    Introducing Emblem.js: a new templating language that compiles to Handlebars.js
If it compiles to Handlebars, it's not an alternative to it, is it?

If Coffeescript is an alternative to Javascript, then yes. If not, no.

Exactly. Emblem.js is for people who love Haml / Slim / Jade and want to use that style of templating with Handlebars.js

It really fits into place if you're coming from one of those libraries. I only wish I could enable percent-sign indicators for HTML tags! (%h1 vs h1)

%h1 is totally valid emblem syntax.

edit: it's optional, of course, but you have to use it if you need to use non-standard (read: unrecognized by emblem) html tags

Not sure how I missed that. It's a kick-ass little feature in my book, because while I appreciate the "implied HTML tags", I do find them easy to miss.

It is not an alternative to a handlebars dependency, but it does mean you can write templates without writing any handlebars code. So it is an alternative to writing Handlebars templates, but not an alternative to using them.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.