You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not 100% sure whether this issue is to do with my own setup, or a problem with this module, but I think the client runtime included here is missing some functions that are needed by jade 1.3.0. As an example, suppose I have a template called test.jade (sorry for the repeated uses of "test") containing:
div(id="this is a #{test}")
Using mimosa-jade, this compiles to the 'test' key in the templates object as:
templates['test'] = function template(locals) {
var buf = [];
var jade_mixins = {};
var jade_interp;
;var locals_for_with = (locals || {});(function (test) {
buf.push("<div" + (jade.attr("id", "This is a " + (test) + "", true, false)) + "></div>");}("test" in locals_for_with?locals_for_with.test:typeof test!=="undefined"?test:undefined));;return buf.join("");
}
Then in my app, I do:
require(['templates'], function (templates) {
console.log(templates.test({test: "success"}));
});
This causes an error: TypeError: jade.attr is not a function. jade is apparently the client runtime, and it looks like it is missing the attr method, which is used here to build the "id" attribute. This method is present in more recent versions of the runtime at visionmedia/jade, so I think the problem may come from mimosa-jade having its own copy of the runtime.
The text was updated successfully, but these errors were encountered:
I'm not 100% sure whether this issue is to do with my own setup, or a problem with this module, but I think the client runtime included here is missing some functions that are needed by jade 1.3.0. As an example, suppose I have a template called
test.jade
(sorry for the repeated uses of "test") containing:Using mimosa-jade, this compiles to the 'test' key in the templates object as:
Then in my app, I do:
This causes an error:
TypeError: jade.attr is not a function
.jade
is apparently the client runtime, and it looks like it is missing theattr
method, which is used here to build the "id" attribute. This method is present in more recent versions of the runtime at visionmedia/jade, so I think the problem may come from mimosa-jade having its own copy of the runtime.The text was updated successfully, but these errors were encountered: