deprecating loadServer in favour of using res.render

v1.18.x
psychobunny 11 years ago
parent 2247a8b21f
commit 4a33b41464

@ -64,6 +64,8 @@
function loadTemplates(templatesToLoad, customTemplateDir) { function loadTemplates(templatesToLoad, customTemplateDir) {
function loadServer() { function loadServer() {
return templates.ready();
var loaded = templatesToLoad.length, var loaded = templatesToLoad.length,
templatesPath = __dirname + '/../templates'; templatesPath = __dirname + '/../templates';
@ -140,8 +142,7 @@
if (!templates[tpl]) { if (!templates[tpl]) {
fs.readFile(filename, function (err, html) { fs.readFile(filename, function (err, html) {
templates[tpl] = html.toString(); templates[tpl] = templates.prepare(html.toString());
templates.prepare(templates[tpl]);
return fn(err, templates[tpl].parse(options)); return fn(err, templates[tpl].parse(options));
}); });

Loading…
Cancel
Save