Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Template URL for debugging #7

Open
wants to merge 1 commit into from

2 participants

abersager Zee Agency
abersager

Storing template URL in template function. When there is an error in a template (say, reference to an variable that is not available), an error logger can use this information to show in which template file the error occurred.

Thanks for a great plugin - my current Backbone project relies heavily on it.

Zee Agency
Owner

Hi,
Thanks for the pull request, I'll try to review and test it asap. Unfortunately I'm very busy at the moment, hope to have more time in 2 weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 0 deletions.
  1. +3 −0  tpl.js
3  tpl.js
View
@@ -180,6 +180,9 @@
}
content = strip ? tpl.strip(content) : content;
+ // store URL, makes debugging of template errors easier
+ content.url = url;
+
if (config.isBuild && config.inlineText) {
buildMap[name] = content;
}
Something went wrong with that request. Please try again.