diff --git a/packages/compat/src/compat-app-builder.ts b/packages/compat/src/compat-app-builder.ts index a6f50740c..290d701e7 100644 --- a/packages/compat/src/compat-app-builder.ts +++ b/packages/compat/src/compat-app-builder.ts @@ -127,13 +127,10 @@ export class CompatAppBuilder { return ['.wasm', '.mjs', '.js', '.json', '.ts', '.hbs', '.hbs.js', '.gjs', '.gts']; } - private addEmberEntrypoints(htmlTreePath: string): string[] { - let classicEntrypoints = ['index.html', 'tests/index.html']; - if (!this.compatApp.shouldBuildTests) { - classicEntrypoints.pop(); - } + private addEmberEntrypoints(): string[] { + let classicEntrypoints = ['index.html']; for (let entrypoint of classicEntrypoints) { - let sourcePath = join(htmlTreePath, entrypoint); + let sourcePath = join(this.compatApp.root, entrypoint); let rewrittenAppPath = join(this.root, entrypoint); writeFileSync(rewrittenAppPath, readFileSync(sourcePath)); } @@ -463,7 +460,7 @@ export class CompatAppBuilder { } let appFiles = this.updateAppJS(inputPaths.appJS); - let assetPaths = this.addEmberEntrypoints(inputPaths.htmlTree); + let assetPaths = this.addEmberEntrypoints(); if (this.activeFastboot) { // when using fastboot, our own package.json needs to be in the output so fastboot can read it. @@ -741,7 +738,6 @@ function addCachablePlugin(babelConfig: TransformOptions) { interface TreeNames { appJS: BroccoliNode; - htmlTree: BroccoliNode; publicTree: BroccoliNode | undefined; configTree: BroccoliNode; } diff --git a/packages/compat/src/compat-app.ts b/packages/compat/src/compat-app.ts index d231ceae5..32459e261 100644 --- a/packages/compat/src/compat-app.ts +++ b/packages/compat/src/compat-app.ts @@ -96,10 +96,6 @@ export default class CompatApp { return require(resolve.sync(specifier, { basedir: this.emberCLILocation })); } - private get configReplace() { - return this.requireFromEmberCLI('broccoli-config-replace'); - } - private get configLoader() { return this.requireFromEmberCLI('broccoli-config-loader'); } @@ -184,45 +180,6 @@ export default class CompatApp { }; } - private get htmlTree() { - if (this.legacyEmberAppInstance.tests) { - return mergeTrees([this.indexTree, this.testIndexTree]); - } else { - return this.indexTree; - } - } - - private get indexTree() { - let indexFilePath = this.legacyEmberAppInstance.options.outputPaths.app.html; - let index = buildFunnel(this.legacyEmberAppInstance.trees.app, { - allowEmpty: true, - include: [`index.html`], - getDestinationPath: () => indexFilePath, - annotation: 'app/index.html', - }); - return new this.configReplace(index, this.configTree, { - configPath: join('environments', `${this.legacyEmberAppInstance.env}.json`), - files: [indexFilePath], - patterns: this.filteredPatternsByContentFor.others, - annotation: 'ConfigReplace/indexTree', - }); - } - - private get testIndexTree() { - let index = buildFunnel(this.legacyEmberAppInstance.trees.tests, { - allowEmpty: true, - include: [`index.html`], - destDir: 'tests', - annotation: 'tests/index.html', - }); - return new this.configReplace(index, this.configTree, { - configPath: join('environments', `test.json`), - files: ['tests/index.html'], - patterns: this.filteredPatternsByContentFor.others, - annotation: 'ConfigReplace/testIndexTree', - }); - } - @Memoize() babelConfig(): TransformOptions { // this finds all the built-in babel configuration that comes with ember-cli-babel @@ -727,7 +684,6 @@ export default class CompatApp { return { appJS: this.processAppJS().appJS, - htmlTree: this.htmlTree, publicTree, configTree, contentForTree, diff --git a/tests/addon-template/tests/dummy/app/index.html b/tests/addon-template/tests/dummy/index.html similarity index 100% rename from tests/addon-template/tests/dummy/app/index.html rename to tests/addon-template/tests/dummy/index.html diff --git a/tests/app-template/app/index.html b/tests/app-template/index.html similarity index 100% rename from tests/app-template/app/index.html rename to tests/app-template/index.html diff --git a/tests/scenarios/compat-addon-classic-features-test.ts b/tests/scenarios/compat-addon-classic-features-test.ts index 2700b77d1..a6ef2a8e0 100644 --- a/tests/scenarios/compat-addon-classic-features-test.ts +++ b/tests/scenarios/compat-addon-classic-features-test.ts @@ -60,8 +60,7 @@ appScenarios }); }; `, - app: { - 'index.html': ` + 'index.html': ` @@ -93,7 +92,6 @@ appScenarios `, - }, }); }) .forEachScenario(scenario => { diff --git a/tests/scenarios/compat-app-html-attributes-test.ts b/tests/scenarios/compat-app-html-attributes-test.ts index e4875e132..ec04b0a28 100644 --- a/tests/scenarios/compat-app-html-attributes-test.ts +++ b/tests/scenarios/compat-app-html-attributes-test.ts @@ -8,13 +8,7 @@ const { module: Qmodule, test } = QUnit; appScenarios .map('compat-app-script-attributes', app => { - let appFolder = app.files.app; - - if (appFolder === null || typeof appFolder !== 'object') { - throw new Error('app folder unexpectedly missing'); - } - - let indexHtml = appFolder['index.html']; + let indexHtml = app.files['index.html']; if (typeof indexHtml !== 'string') { throw new Error('index.html unexpectedly missing'); @@ -38,9 +32,7 @@ appScenarios indexHtml = indexHtml.replace(/