Skip to content

Commit 64e282d

Browse files
committed
fix: ember-cli-typescript-blueprints no longer claims higher priority of all other addons
1 parent c0bc3d7 commit 64e282d

File tree

2 files changed

+217
-88
lines changed

2 files changed

+217
-88
lines changed

ts/addon.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,16 @@ module.exports = {
2828
// This won't be necessary in 2.x if we shift to adding the blueprints addon as a host
2929
// dependency on install.
3030
if (this.project.addons.includes(this)) {
31-
this.project.addons.push(this.addons.find(addon => addon.name === 'ember-cli-typescript-blueprints'));
31+
// index of 'ember-cli-typescript'
32+
const ecliTsIndex = this.project.addons.map(a => a.name).indexOf('ember-cli-typescript');
33+
// index of 'ember-cli-typescript-blueprints'
34+
const ecliTsBlueprintIndex = this.project.addons.map(a => a.name).indexOf('ember-cli-typescript-blueprints');
35+
// move 'ember-cli-typescript-blueprints' from its current position, to immediately after 'ember-cli-typescript'
36+
this.project.addons.splice(
37+
ecliTsIndex + 1,
38+
0,
39+
this.project.addons[ecliTsBlueprintIndex]);
40+
this.project.addons.splice(ecliTsBlueprintIndex + 1, 1);
3241
}
3342

3443
if (this.project.isEmberCLIAddon()) {

0 commit comments

Comments
 (0)