mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
15 lines
507 B
JavaScript
15 lines
507 B
JavaScript
'use strict';
|
|
var target = require('./TemplateCompiler');
|
|
require('raptor-util').extend(target, {
|
|
_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);
|
|
}
|
|
}); |