raptor
Version:
RaptorJS provides an AMD module loader that works in Node, Rhino and the web browser. It also includes various sub-modules to support building optimized web applications.
19 lines (17 loc) • 613 B
JavaScript
define.extend('raptor/templating/compiler/TemplateCompiler', function(require, target) {
"use strict";
return {
_eval: function(compiledSrc, resource) {
var filePath;
if (resource) {
if (typeof resource === 'string') {
filePath = resource;
}
else if (require('raptor/resources').isResource(resource)) {
filePath = resource.getURL();
}
}
__rhinoHelpers.runtime.evaluateString(compiledSrc, filePath || null);
}
};
});