mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-17 16:30:10 +02:00
added new hook that is called before templates are compiled
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user