added new hook that is called before templates are compiled

v1.18.x
Julian Lam 9 years ago
parent 694b9e38b9
commit dd050c8177

@ -42,10 +42,14 @@ Templates.compile = function(callback) {
}
}
plugins.getTemplates(function(err, pluginTemplates) {
async.waterfall([
async.apply(plugins.fireHook, 'static:templates.precompile', {}),
async.apply(plugins.getTemplates)
], function(err, pluginTemplates) {
if (err) {
return callback(err);
}
winston.verbose('[meta/templates] Compiling templates');
rimraf.sync(viewsPath);
mkdirp.sync(viewsPath);

Loading…
Cancel
Save