|
|
@ -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));
|
|
|
|
});
|
|
|
|
});
|
|
|
|