Skip to content

Instantly share code, notes, and snippets.

@danwrong
Created April 13, 2011 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danwrong/918610 to your computer and use it in GitHub Desktop.
Save danwrong/918610 to your computer and use it in GitHub Desktop.
function Template(path) {}
Template.prototype = new loadrunner.Dependency;
Template.prototype.start = function() {
// called when first callback is added
// start the template load
this.load(function(source) {
// call complete when its done
var template = this.compile(source)
this.complete(template);
})
};
using.matchers.add(/\.mustache$/, function(path) {
return loadrunner.Template(path);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment