I'm trying emblem.js right now. It's a really good wrapper of Handlebars to write templates. However, the docs are a bit ember.js and handlebars.js dependent. I want to use Emblem.js without Ember, but there is no real explanation on how to compile the template.
So can we use emblem.js without ember (or better, without Handlebars dependency)? The way I'm doing it right now, I have this function to render the template:
function render(target, tmpl, data) {
var source = tmpl.html();
var template = Emblem.compile(Handlebars, source);
var result = template(data);
target.html(result);
}
Is that the correct way to compile Emblem? It works, but I have a gut feeling that there's a better way to do that. In Handlebars, the compile line is quite similar:
var template = Handlebars.compile(source);
Thanks for the answers.