async function registerHooks (hooks, templateConfig, templateDir, hooksDir) {
  await registerLocalHooks(hooks, templateDir, hooksDir);

  if (templateConfig && Object.keys(templateConfig).length > 0) await registerConfigHooks(hooks, templateDir, templateConfig);
  
  return hooks;
}
Registers all template hooks.
@param {Object} hooks Object that stores information about all available hook functions grouped by the type of the hook.
@param {Object} templateConfig Template configuration.
@param {String} templateDir Directory where template is located.
@param {String} hooksDir Directory where local hooks are located.