Closed TimothyGu closed 9 years ago
Allows one to do:
var jadeSrc = 'p= body'; // By default compileClient automatically embeds the needed runtime functions, // rendering this module useless. var compiledCode = jade.compileClient(jadeSrc, { externalRuntime: true }); //=> 'function template (locals) { ... jade.escape() ... }' var templateFunc = wrap(compiledCode); templateFunc({body: 'Hey!'}); //=> '<p>Hey!</p>'
There are plenty of places where this can be used:
Code LGTM. I was thinking about the p= body example. I found it somewhat confusing because body is also an HTML tag. Could we change it to something else, maybe h1 Hello #{name}?
Allows one to do:
There are plenty of places where this can be used: