Skip to content

Commit 5e917ae

Browse files
author
Robert Jackson
authored
Merge pull request #803 from kiwiupover/dave/custom-fastboot-app
2 parents 3f54024 + 3085718 commit 5e917ae

44 files changed

Lines changed: 574 additions & 188 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,5 @@ jobs:
8888
run: yarn install --ignore-engines --frozen-lockfile
8989
- name: Basic App
9090
run: yarn workspace basic-app test:mocha
91+
- name: Custom App
92+
run: yarn workspace custom-fastboot-app test:mocha

packages/ember-cli-fastboot/.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ module.exports = {
1515
browser: true
1616
},
1717
rules: {
18+
'ember/no-get': 'warn',
19+
'ember/require-computed-property-dependencies': 'warn'
1820
},
1921
overrides: [
2022
// node files

packages/ember-cli-fastboot/test/custom-html-file-test.js

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

packages/ember-cli-fastboot/test/fixtures/custom-html-file/app/app.js

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

packages/ember-cli-fastboot/test/fixtures/custom-html-file/app/index.html

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

packages/ember-cli-fastboot/test/fixtures/custom-html-file/app/router.js

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

packages/ember-cli-fastboot/test/fixtures/custom-html-file/app/templates/application.hbs

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

packages/ember-cli-fastboot/test/fixtures/custom-html-file/config/environment.js

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

packages/ember-cli-fastboot/test/package-json-test.js

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -11,49 +11,6 @@ chai.use(require('chai-fs'));
1111
describe('generating package.json', function() {
1212
this.timeout(300000);
1313

14-
describe('with customized fingerprinting options', function() {
15-
// Tests an app with a custom `assetMapPath` set
16-
let customApp = new AddonTestApp();
17-
18-
before(function() {
19-
return customApp.create('customized-fingerprinting', { emberVersion: 'latest'})
20-
.then(function() {
21-
return customApp.runEmberCommand('build', '--environment=production');
22-
});
23-
});
24-
25-
it('respects a custom asset map path and prepended URLs', function() {
26-
expect(customApp.filePath('dist/totally-customized-asset-map.json')).to.be.a.file();
27-
28-
function p(filePath) {
29-
return customApp.filePath(path.join('dist', filePath));
30-
}
31-
32-
let pkg = fs.readJsonSync(customApp.filePath('/dist/package.json'));
33-
let manifest = pkg.fastboot.manifest;
34-
35-
manifest.appFiles.forEach(function(file) {
36-
expect(p(file)).to.be.a.file();
37-
});
38-
expect(p(manifest.htmlFile)).to.be.a.file();
39-
manifest.vendorFiles.forEach(function(file) {
40-
expect(p(file)).to.be.a.file();
41-
});
42-
});
43-
44-
it('respects individual files being excluded from fingerprinting', function() {
45-
expect(customApp.filePath('dist/totally-customized-asset-map.json')).to.be.a.file();
46-
47-
let pkg = fs.readJsonSync(customApp.filePath('/dist/package.json'));
48-
let manifest = pkg.fastboot.manifest;
49-
50-
// customized-fingerprinting-fastboot.js is excluded from fingerprinting
51-
expect(manifest.appFiles).to.include('assets/customized-fingerprinting-fastboot.js');
52-
// vendor.js is excluded from fingerprinting
53-
expect(manifest.vendorFiles).to.include('assets/vendor.js');
54-
});
55-
});
56-
5714
describe('with customized outputPaths options', function() {
5815
// Tests an app with a custom `outputPaths` set
5916
let customApp = new AddonTestApp();
@@ -85,30 +42,5 @@ describe('generating package.json', function() {
8542
});
8643
});
8744
});
88-
89-
describe('with custom htmlFile', function() {
90-
this.timeout(300000);
91-
92-
let customApp = new AddonTestApp();
93-
94-
before(function() {
95-
return customApp.create('custom-html-file')
96-
.then(function() {
97-
return customApp.runEmberCommand('build', '--environment=production');
98-
});
99-
});
100-
101-
it('uses custom htmlFile in the manifest', function() {
102-
function p(filePath) {
103-
return customApp.filePath(path.join('dist', filePath));
104-
}
105-
106-
let pkg = fs.readJsonSync(customApp.filePath('/dist/package.json'));
107-
let manifest = pkg.fastboot.manifest;
108-
109-
expect(manifest.htmlFile).to.equal('custom-index.html');
110-
expect(p(manifest.htmlFile)).to.be.a.file();
111-
});
112-
});
11345
});
11446

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
indent_style = space
13+
indent_size = 2
14+
15+
[*.hbs]
16+
insert_final_newline = false
17+
18+
[*.{diff,md}]
19+
trim_trailing_whitespace = false

0 commit comments

Comments
 (0)