bminer / node-blade

Blade - HTML Template Compiler, inspired by Jade & Haml
Other
320 stars 28 forks source link

Require.JS support #177

Closed Rush closed 11 years ago

Rush commented 11 years ago

Would be nice to be able to use Blade templates like this:

require(['blade!templates/mytemplate', function(tpl) {
   $(body).html(tpl({somedata: 'foo'}));
});

This should request GET /templates/mytemplate.blade in the debug build and in an optimized built a pre-compiled templated should be already present and loaded. See require-jade project that does that for jade.

bminer commented 11 years ago

I've never used Require.JS. What, specifically, would need to be changed in Blade to make this work?

Rush commented 11 years ago

Actually it's totally different paradigm of loading stuff. I support support for it is not trivial to add. If you haven't used and will not use it then perhaps it's a bad feature request. :) I was considering blade for a second there since it's better than jade but lack of require.js plugin puts me off and I am not motivated enough to write one myself. Cheers.

2013/6/10 Blake Miner notifications@github.com

I've never used Require.JS. What, specifically, would need to be changed in Blade to make this work?

— Reply to this email directly or view it on GitHubhttps://github.com/bminer/node-blade/issues/177#issuecomment-19204443 .

bminer commented 11 years ago

@RushPL - fair enough. If you feel motivation in the future, just hit me up. I can answer any questions you might have about Blade.

Closing this issue for now...