marko/lib/compiler/TemplateCompiler_rhino.js
2014-01-07 16:59:30 -07:00

19 lines
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);
}
};
});