Skip to content

Commit aec2e45

Browse files
committed
Remove custom html from test app, which is not used
1 parent 78c8ec2 commit aec2e45

File tree

3 files changed

+19
-26
lines changed

3 files changed

+19
-26
lines changed

packages/ember-cli-fastboot/lib/broccoli/html-writer.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ const Filter = require('broccoli-persistent-filter');
44
const { JSDOM } = require('jsdom');
55

66
module.exports = class BasePageWriter extends Filter {
7-
constructor(inputNodes, { annotation, fastbootConfig, appName, manifest, outputPaths }) {
7+
constructor(
8+
inputNodes,
9+
{ annotation, fastbootConfig, appName, manifest, outputPaths }
10+
) {
811
super(inputNodes, {
912
annotation,
1013
extensions: ['html'],
@@ -20,7 +23,9 @@ module.exports = class BasePageWriter extends Filter {
2023
getDestFilePath() {
2124
let filteredRelativePath = super.getDestFilePath(...arguments);
2225

23-
return filteredRelativePath === this._manifest.htmlFile ? filteredRelativePath : null;
26+
return filteredRelativePath === this._manifest.htmlFile
27+
? filteredRelativePath
28+
: null;
2429
}
2530

2631
processString(content) {
@@ -49,7 +54,10 @@ module.exports = class BasePageWriter extends Filter {
4954
}
5055
let nodeRange = new NodeRange(firstConfigMeta);
5156
for (let [name, options] of Object.entries(this._fastbootConfig)) {
52-
nodeRange.insertJsonAsMetaTag(`${name}/config/fastboot-environment`, options);
57+
nodeRange.insertJsonAsMetaTag(
58+
`${name}/config/fastboot-environment`,
59+
options
60+
);
5361
}
5462
}
5563

@@ -61,7 +69,9 @@ module.exports = class BasePageWriter extends Filter {
6169
let fastbootScripts = this._findFastbootScriptToInsert(scriptTags);
6270
let appJsTag = findAppJsTag(scriptTags, this._appJsPath, this._rootURL);
6371
if (!appJsTag) {
64-
throw new Error('ember-cli-fastboot cannot find own app script tag');
72+
throw new Error(
73+
'ember-cli-fastboot cannot find own app script tag, please check your html file'
74+
);
6575
}
6676

6777
insertFastbootScriptsBeforeAppJsTags(fastbootScripts, appJsTag);
@@ -76,15 +86,17 @@ module.exports = class BasePageWriter extends Filter {
7686

7787
return this._manifest.vendorFiles
7888
.concat(this._manifest.appFiles)
79-
.map(src => urlWithin(src, rootURL))
80-
.filter(src => !scriptSrcs.includes(src));
89+
.map((src) => urlWithin(src, rootURL))
90+
.filter((src) => !scriptSrcs.includes(src));
8191
}
8292

8393
_ignoreUnexpectedScripts(scriptTags) {
8494
let expectedFiles = this._expectedFiles;
8595
let rootURL = this._rootURL;
8696
for (let element of scriptTags) {
87-
if (!expectedFiles.includes(urlWithin(element.getAttribute('src'), rootURL))) {
97+
if (
98+
!expectedFiles.includes(urlWithin(element.getAttribute('src'), rootURL))
99+
) {
88100
element.setAttribute('data-fastboot-ignore', '');
89101
}
90102
}

test-packages/ember-cli-fastboot-testing-app/config/environment.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ module.exports = function(environment) {
77
rootURL: '/',
88
locationType: 'auto',
99

10-
fastboot: {
11-
htmlFile: 'custom-index.html'
12-
},
13-
1410
EmberENV: {
1511
FEATURES: {
1612
// Here you can enable experimental features on an ember canary build

test-packages/ember-cli-fastboot-testing-app/public/custom-index.html

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)