Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions lib/ember-addon-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,9 @@ module.exports = {
return this._cachedShouldColocateTemplates;
},

// This method is monkey patched by CSS Blocks,
// Please coordinate with @chriseppstein if you need to change it.
transpileTree(inputTree, htmlbarsOptions) {
transpileTree(inputTree) {
const TemplateCompiler = require('./template-compiler-plugin');

return new TemplateCompiler(inputTree, htmlbarsOptions, this._requiresModuleApiPolyfill);
return new TemplateCompiler(inputTree);
},

setupPreprocessorRegistry(type, registry) {
Expand All @@ -85,7 +82,6 @@ module.exports = {
);

let shouldColocateTemplates = this._addon._shouldColocateTemplates();
let htmlbarsOptions = this._addon.htmlbarsOptions();

let inputTree = debugTree(tree, '01-input');

Expand All @@ -95,14 +91,7 @@ module.exports = {
inputTree = debugTree(new ColocatedTemplateProcessor(inputTree), '02-colocated-output');
}

this._addon.logger.debug(`setup *.hbs compiler with ${htmlbarsOptions.pluginNames}`);
let output = debugTree(
this._addon.transpileTree(inputTree, {
isProduction,
...htmlbarsOptions,
}),
'03-output'
);
let output = debugTree(this._addon.transpileTree(inputTree), '03-output');

let checker = new VersionChecker(this._addon.project).for('ember-cli', 'npm');
let requiresBabelTree = checker.lt('3.13.0');
Expand Down
7 changes: 2 additions & 5 deletions lib/template-compiler-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ const Filter = require('broccoli-persistent-filter');
const jsStringEscape = require('js-string-escape');

class TemplateCompiler extends Filter {
constructor(inputTree, options = {}) {
if (!('persist' in options)) {
options.persist = true;
}
super(inputTree, options);
constructor(inputTree) {
super(inputTree, { persist: true });
}

baseDir() {
Expand Down