lib/email.js
function loadTemplates(list, type) {
  if (!list) {
    return;
  }

  var result = {};

  type = type || 'plaintext';

  list.forEach(function (name) {
    var templatePath = path.join(templateBasePath, type, `${name}.pug`);
    result[name] = renderPug(templatePath);
  });

  return result;
}
function loadTemplates(list, type) {
  if (!list) {
    return;
  }

  var result = {};

  type = type || 'plaintext';

  list.forEach(function (name) {
    var templatePath = path.join(templateBasePath, type, `${name}.pug`);
    result[name] = renderPug(templatePath);
  });

  return result;
}
/*
loading all of the email templates at server start