mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
19 lines
613 B
JavaScript
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);
|
|
}
|
|
};
|
|
}); |