bem / bem-xjst

bem-xjst (eXtensible JavaScript Templates): declarative template engine for the browser and server
https://bem.github.io/bem-xjst
Other
116 stars 48 forks source link

Provide better way for debug #77

Closed tadatuta closed 9 years ago

tadatuta commented 9 years ago

Now any bug in templates with bem-xjst 2.x results with stack trace pointing to

var templates = code.toString().replace(/^function[^{]+{|}$/g, '');
  templates = new Function(BEMHTML.locals.join(', '), templates);

which is kinda useless.

indutny commented 9 years ago

Yeah... it is terrible. Let me see if I can improve it...

indutny commented 9 years ago

Fix is here: 4cc90a0 . It will get better a bit ;)

indutny commented 9 years ago

Also, released everything in 3.0.0, because I broke backwards compatibility while removing .apply.call(...).