Skip to content

Commit

Permalink
chore: test against embroider
Browse files Browse the repository at this point in the history
  • Loading branch information
knownasilya committed Sep 9, 2020
1 parent a5cc0fe commit 82ec6bf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
fast_finish: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=embroider-tests

include:
# runs linting and tests with current locked deps
Expand All @@ -54,6 +55,7 @@ jobs:
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery
- env: EMBER_TRY_SCENARIO=ember-classic
- env: EMBER_TRY_SCENARIO=embroider-tests

script:
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
15 changes: 14 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,18 @@ module.exports = function (defaults) {
destDir: '/fonts',
});

return mergeTrees([app.toTree(), fonts]);
let appWithFonts = mergeTrees([app.toTree(), fonts]);

if ('@embroider/webpack' in app.dependencies()) {
const { Webpack } = require('@embroider/webpack'); // eslint-disable-line
return require('@embroider/compat') // eslint-disable-line
.compatBuild(appWithFonts, Webpack, {
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
staticHelpers: true,
staticComponents: true,
});
}

return appWithFonts;
};

0 comments on commit 82ec6bf

Please sign in to comment.