Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,5 @@ jobs:
run: yarn install --ignore-engines --frozen-lockfile
- name: Basic App
run: yarn workspace basic-app test:mocha
- name: Custom App
run: yarn workspace custom-fastboot-app test:mocha
2 changes: 2 additions & 0 deletions packages/ember-cli-fastboot/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ module.exports = {
browser: true
},
rules: {
'ember/no-get': 'warn',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a new ember app to the test-packages has updated ember-cli-eslint which has added new linting rules.

'ember/require-computed-property-dependencies': 'warn'
},
overrides: [
// node files
Expand Down
44 changes: 0 additions & 44 deletions packages/ember-cli-fastboot/test/custom-html-file-test.js

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

68 changes: 0 additions & 68 deletions packages/ember-cli-fastboot/test/package-json-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,49 +11,6 @@ chai.use(require('chai-fs'));
describe('generating package.json', function() {
this.timeout(300000);

describe('with customized fingerprinting options', function() {
// Tests an app with a custom `assetMapPath` set
let customApp = new AddonTestApp();

before(function() {
return customApp.create('customized-fingerprinting', { emberVersion: 'latest'})
.then(function() {
return customApp.runEmberCommand('build', '--environment=production');
});
});

it('respects a custom asset map path and prepended URLs', function() {
expect(customApp.filePath('dist/totally-customized-asset-map.json')).to.be.a.file();

function p(filePath) {
return customApp.filePath(path.join('dist', filePath));
}

let pkg = fs.readJsonSync(customApp.filePath('/dist/package.json'));
let manifest = pkg.fastboot.manifest;

manifest.appFiles.forEach(function(file) {
expect(p(file)).to.be.a.file();
});
expect(p(manifest.htmlFile)).to.be.a.file();
manifest.vendorFiles.forEach(function(file) {
expect(p(file)).to.be.a.file();
});
});

it('respects individual files being excluded from fingerprinting', function() {
expect(customApp.filePath('dist/totally-customized-asset-map.json')).to.be.a.file();

let pkg = fs.readJsonSync(customApp.filePath('/dist/package.json'));
let manifest = pkg.fastboot.manifest;

// customized-fingerprinting-fastboot.js is excluded from fingerprinting
expect(manifest.appFiles).to.include('assets/customized-fingerprinting-fastboot.js');
// vendor.js is excluded from fingerprinting
expect(manifest.vendorFiles).to.include('assets/vendor.js');
});
});

describe('with customized outputPaths options', function() {
// Tests an app with a custom `outputPaths` set
let customApp = new AddonTestApp();
Expand Down Expand Up @@ -85,30 +42,5 @@ describe('generating package.json', function() {
});
});
});

describe('with custom htmlFile', function() {
this.timeout(300000);

let customApp = new AddonTestApp();

before(function() {
return customApp.create('custom-html-file')
.then(function() {
return customApp.runEmberCommand('build', '--environment=production');
});
});

it('uses custom htmlFile in the manifest', function() {
function p(filePath) {
return customApp.filePath(path.join('dist', filePath));
}

let pkg = fs.readJsonSync(customApp.filePath('/dist/package.json'));
let manifest = pkg.fastboot.manifest;

expect(manifest.htmlFile).to.equal('custom-index.html');
expect(p(manifest.htmlFile)).to.be.a.file();
});
});
});

19 changes: 19 additions & 0 deletions test-packages/custom-fastboot-app/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

[*.hbs]
insert_final_newline = false

[*.{diff,md}]
trim_trailing_whitespace = false
9 changes: 9 additions & 0 deletions test-packages/custom-fastboot-app/.ember-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false
}
20 changes: 20 additions & 0 deletions test-packages/custom-fastboot-app/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
53 changes: 53 additions & 0 deletions test-packages/custom-fastboot-app/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
},
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'lib/*/index.js',
'server/**/*.js'
],
parserOptions: {
sourceType: 'script'
},
env: {
browser: false,
node: true
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
rules: {
// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
'node/no-unpublished-require': 'off'
}
}
]
};
25 changes: 25 additions & 0 deletions test-packages/custom-fastboot-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
5 changes: 5 additions & 0 deletions test-packages/custom-fastboot-app/.template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: 'octane'
};
31 changes: 31 additions & 0 deletions test-packages/custom-fastboot-app/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
language: node_js
node_js:
- "10"

dist: xenial

addons:
chrome: stable

cache:
yarn: true

env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1

branches:
only:
- master

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH

install:
- yarn install --non-interactive

script:
- yarn test
3 changes: 3 additions & 0 deletions test-packages/custom-fastboot-app/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
}
Loading