mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-01-25 14:42:47 +00:00
16 lines
324 B
JavaScript
16 lines
324 B
JavaScript
/**
|
|
* jade模版引擎
|
|
* expressjs默认为该模版引擎
|
|
* @type {[type]}
|
|
*/
|
|
var jade = require('jade');
|
|
|
|
module.exports = {
|
|
fetch: function(templateFile, tVar){
|
|
'use strict';
|
|
var content = getFileContent(templateFile);
|
|
var fn = jade.compile(content, {});
|
|
var html = fn(tVar);
|
|
return html;
|
|
}
|
|
}; |