compileTemplates(addonTree) {
    if (this.shouldCompileTemplates()) {
      if (!registryHasPreprocessor(this.registry, 'template')) {
        throw new SilentError(
          `Addon templates were detected, but there are no template compilers registered for \`${this.name}\`. ` +
            `Please make sure your template precompiler (commonly \`ember-cli-htmlbars\`) is listed in \`dependencies\` ` +
            `(NOT \`devDependencies\`) in \`${this.name}\`'s \`package.json\`.`
        );
      }

      let preprocessedTemplateTree = this._addonPreprocessTree('template', addonTree);

      let processedTemplateTree = preprocessTemplates(preprocessedTemplateTree, {
        annotation: `compileTemplates(${this.name})`,
        registry: this.registry,
        treeType: 'addon-templates',
      });

      let postprocessedTemplateTree = this._addonPostprocessTree('template', processedTemplateTree);

      return postprocessedTemplateTree;
    } else {
      return addonTree;
    }
  }
Runs the templates tree through preprocessors.

    @private
    @method compileTemplates
    @param {Tree} tree Templates file tree
    @return {Tree} Compiled templates tree