I know the feeling, generally, I’d convert everything to HAML but sometimes, ERB was just more sensible. Kinda like SASS vs SCSS. Sometimes I just want to paste something.
I think so, I mean, look at the generated template output:
Template.__checkName("about");
Template["about"] = new Template("Template.about", (function() {
var view = this;
return HTML.DIV(
{
vertical: "",
layout: "",
center: ""
},
HTML.DIV(
{
"class": "content"
},
HTML.Raw("<h2>Title</h2>"),
Spacebars.include(view.lookupTemplate("content")),
HTML.getTag("some-other-element")({
"class": [ "other" ],
someproperty: function() {
return Spacebars.mustache(view.lookup("currentEmail"));
}
}
)
)
);
}));
Yes, it’s verbose, no this doesn’t have to be the layer we interface with.
It does however feels a bit weird that this API is interfacing with Spacebars, I mean, shouldn’t that be under Blaze? This already looks pretty close to something pure-javascript based. I think we could benefit from a layer that makes this great for components, it just needs some syntactic sugar and polish.
This is just my two cents, I like most other people would still want both, but I’m writing less and less static html these days, I write applications, not blogs I don’t want to write static apps, or slightly dynamic html apps, otherwise I’d grab Rails (Which isn’t to say meteor isn’t a good choice for static content or the odd blob of content)