@@ -9,18 +9,6 @@ const stew = require('broccoli-stew');
99module . exports = {
1010 name : 'ember-cli-typescript' ,
1111
12- init ( ) {
13- this . _super . init . apply ( this , arguments ) ;
14-
15- // If we're a direct dependency of the app, we cheat and add our instance of the blueprints
16- // addon to the project, as only top-level addons contribute blueprints.
17- // This won't be necessary in 2.x if we shift to adding the blueprints addon as a host
18- // dependency on install.
19- if ( this . project . addons . includes ( this ) ) {
20- this . project . addons . push ( this . addons . find ( addon => addon . name === 'ember-cli-typescript-blueprints' ) ) ;
21- }
22- } ,
23-
2412 included ( includer ) {
2513 this . _super . included . apply ( this , arguments ) ;
2614
@@ -31,6 +19,16 @@ module.exports = {
3119 } ,
3220
3321 includedCommands ( ) {
22+ // If we're a direct dependency of the app, we cheat and add our instance of the blueprints
23+ // addon to the project, as only top-level addons contribute blueprints. We need to be careful
24+ // with the timing of when we do this, as it has to happen after addon initialization is
25+ // complete, but before blueprint paths are resolved.
26+ // This won't be necessary in 2.x if we shift to adding the blueprints addon as a host
27+ // dependency on install.
28+ if ( this . project . addons . includes ( this ) ) {
29+ this . project . addons . push ( this . addons . find ( addon => addon . name === 'ember-cli-typescript-blueprints' ) ) ;
30+ }
31+
3432 if ( this . project . isEmberCLIAddon ( ) ) {
3533 return {
3634 'ts:precompile' : require ( './lib/commands/precompile' ) ,
0 commit comments