Skip to content

Commit 2286c97

Browse files
authored
Support embroider (#383)
* Support embroider * rm 3.4 3.8 * Rm travis and add embroider test to github action
1 parent b0a7b2d commit 2286c97

File tree

6 files changed

+1236
-226
lines changed

6 files changed

+1236
-226
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ jobs:
2121
ember-lts-3.20,
2222
ember-beta,
2323
ember-canary,
24-
ember-default-with-jquery
24+
ember-default-with-jquery,
25+
embroider-tests
2526
]
2627
steps:
2728
- uses: actions/checkout@v2

.travis.yml

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

config/ember-try.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,17 @@ module.exports = async function() {
6868
'@ember/jquery': '^0.5.1'
6969
}
7070
}
71-
}
71+
},
72+
{
73+
name: 'embroider-tests',
74+
npm: {
75+
devDependencies: {
76+
'@embroider/core': '*',
77+
'@embroider/webpack': '*',
78+
'@embroider/compat': '*',
79+
},
80+
},
81+
},
7282
]
7383
};
7484
};

ember-cli-build.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,18 @@ module.exports = function(defaults) {
1212
addon, located in `/tests/dummy`
1313
This build file does *not* influence how the addon or the app using it
1414
behave. You most likely want to be modifying `./index.js` or app's build file
15-
*/
15+
*/
16+
17+
if ('@embroider/webpack' in app.dependencies()) {
18+
const { Webpack } = require('@embroider/webpack'); // eslint-disable-line
19+
return require('@embroider/compat') // eslint-disable-line
20+
.compatBuild(app, Webpack, {
21+
staticAddonTestSupportTrees: true,
22+
staticAddonTrees: true,
23+
staticHelpers: true,
24+
staticComponents: true,
25+
});
26+
}
1627

1728
return app.toTree();
1829
};

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"broccoli-asset-rev": "^3.0.0",
2828
"chai": "^3.5.0",
2929
"ember-auto-import": "^1.5.2",
30-
"ember-cli": "~3.17.0",
30+
"ember-cli": "~3.20.0",
3131
"ember-cli-dependency-checker": "^3.0.0",
3232
"ember-cli-eslint": "^5.0.0",
3333
"ember-cli-htmlbars": "^3.0.1",
@@ -48,7 +48,7 @@
4848
"ember-qunit": "^4.1.2",
4949
"ember-resolver": "^5.0.1",
5050
"ember-sinon": "^3.0.0",
51-
"ember-source": "~3.17.0",
51+
"ember-source": "~3.20.0",
5252
"ember-source-channel-url": "^2.0.1",
5353
"ember-try": "^1.2.1",
5454
"eslint-plugin-ember": "^7.1.0",

0 commit comments

Comments
 (0)