Runs the addon tree through preprocessors. @private @method compileAddon @param {Tree} tree Addon file tree @return {Tree} Compiled addon tree
(tree)
| 1119 | @return {Tree} Compiled addon tree |
| 1120 | */ |
| 1121 | compileAddon(tree) { |
| 1122 | if (!this.options) { |
| 1123 | throw new SilentError( |
| 1124 | `Ember CLI addons manage their own module transpilation during the \`treeForAddon\` processing. ` + |
| 1125 | `\`${this.name}\` (found at \`${this.root}\`) has removed \`this.options\` ` + |
| 1126 | `which conflicts with the addons ability to transpile its \`addon/\` files properly.` |
| 1127 | ); |
| 1128 | } |
| 1129 | |
| 1130 | if (!this.options.babel) { |
| 1131 | throw new SilentError( |
| 1132 | `Ember CLI addons manage their own module transpilation during the \`treeForAddon\` processing. ` + |
| 1133 | `\`${this.name}\` (found at \`${this.root}\`) has overridden the \`this.options.babel\` options ` + |
| 1134 | `which conflicts with the addons ability to transpile its \`addon/\` files properly.` |
| 1135 | ); |
| 1136 | } |
| 1137 | |
| 1138 | if (!this.options['ember-cli-babel']) { |
| 1139 | throw new SilentError( |
| 1140 | `Ember CLI addons manage their own module transpilation during the \`treeForAddon\` processing. ` + |
| 1141 | `\`${this.name}\` (found at \`${this.root}\`) has overridden the \`this.options['ember-cli-babel']\` options ` + |
| 1142 | `which conflicts with the addons ability to transpile its \`addon/\` files properly.` |
| 1143 | ); |
| 1144 | } |
| 1145 | |
| 1146 | let scopedInput = new Funnel(tree, { |
| 1147 | destDir: this.moduleName(), |
| 1148 | annotation: `Funnel: ${this.name}/addon`, |
| 1149 | }); |
| 1150 | |
| 1151 | let treeWithCompiledTemplates = this.compileTemplates(scopedInput); |
| 1152 | let final = this.processedAddonJsFiles(treeWithCompiledTemplates); |
| 1153 | |
| 1154 | return final; |
| 1155 | }, |
| 1156 | |
| 1157 | /** |
| 1158 | Returns a tree with JSHint output for all addon JS. |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…