Created
April 13, 2011 22:58
-
-
Save danwrong/918610 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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