Skip to content

Commit

Permalink
Merge pull request #32 from SergeAstapov/embroider-preparation
Browse files Browse the repository at this point in the history
Test addon against Embroider
  • Loading branch information
rwjblue authored Oct 28, 2020
2 parents c64e207 + 2b3b7d5 commit 4236e56
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,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 @@ -47,6 +48,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

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
Expand Down
10 changes: 10 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ module.exports = async function() {
edition: 'classic'
}
}
},
{
name: 'embroider-tests',
npm: {
devDependencies: {
'@embroider/core': '*',
'@embroider/webpack': '*',
'@embroider/compat': '*',
},
},
}
]
};
Expand Down
10 changes: 10 additions & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ module.exports = function(defaults) {
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
*/
if ('@embroider/webpack' in app.dependencies()) {
const { Webpack } = require('@embroider/webpack'); // eslint-disable-line
return require('@embroider/compat') // eslint-disable-line
.compatBuild(app, Webpack, {
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
staticHelpers: true,
staticComponents: true,
});
}

return app.toTree();
};

0 comments on commit 4236e56

Please sign in to comment.