code: function loadTemplates() {
    const templatesPath = path.join(process.cwd(), plugin.config.templatesPath);
  
    return plugin.myrmex.fire('beforeTemplatesLoad')
    .then(() => {
      // Retrieve paths of all node packages
      return Promise.promisify(fs.readdir)(templatesPath);
    })
    .then(files => {
      // Load all packages configurations
      const templatePromises = [];
      _.forEach(files, (fileName) => {
        const templatePath = path.join(templatesPath, fileName);
        // subdir is the identifier of the template, so we pass it as the second argument
        templatePromises.push(loadTemplate(templatePath, fileName));
      });
      return Promise.all(templatePromises);
    })
    .then(templates => {
      // This event allows to inject code to add or delete or alter node templates configurations
      return plugin.myrmex.fire('afterTemplatesLoad', templates);
    })
    .spread(templates => {
      return Promise.resolve(templates);
    })
    .catch(e => {
      // In case the project does not have any template yet, an exception will be thrown
      // We silently ignore it
      if (e.code === 'ENOENT' && path.basename(e.path) === 'templates') {
        return Promise.resolve([]);
      }
      return Promise.reject(e);
    });
  }
docs: Load all packages
  @return {Promise<[Template]>} - promise of an array of Cloud Formation templates