mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-01-25 14:42:47 +00:00
17 lines
382 B
JavaScript
17 lines
382 B
JavaScript
/**
|
|
* ejs
|
|
* https://github.com/visionmedia/ejs
|
|
* @type {[type]}
|
|
*/
|
|
var ejs = require('ejs');
|
|
module.exports = {
|
|
fetch: function(templateFile, tVar){
|
|
'use strict';
|
|
var content = getFileContent(templateFile);
|
|
var conf = extend({
|
|
filename: templateFile,
|
|
cache: true
|
|
}, C('tpl_engine_config'));
|
|
return ejs.compile(content, conf)(tVar);
|
|
}
|
|
}; |