code: function generateDirective(originalName) {
      var template = args.t || args.template || "html";
      var name = originalName.split("/").pop();
      var obj = {
          name: name,
          original_name: originalName,
          template_extension: template,
      };
      var gen = {
          json: templates.generator.config(),
          js: templates.generator.js(),
          scss: templates.generator.scss(),
      };
  
      gen[template] = templates.generator[template]();
  
      return Object.keys(gen).reduce(function (files, ext) {
          files[originalName + "/" + name + "." + ext] = replaceText(gen[ext], obj);
          return files;
      }, {});
  }
docs: Generating functions