File tree Expand file tree Collapse file tree 2 files changed +217
-88
lines changed Expand file tree Collapse file tree 2 files changed +217
-88
lines changed Original file line number Diff line number Diff 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 ( ) ) {
You can’t perform that action at this time.
0 commit comments