@@ -9,18 +9,6 @@ const stew = require('broccoli-stew');
9
9
module . exports = {
10
10
name : 'ember-cli-typescript' ,
11
11
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
-
24
12
included ( includer ) {
25
13
this . _super . included . apply ( this , arguments ) ;
26
14
@@ -31,6 +19,16 @@ module.exports = {
31
19
} ,
32
20
33
21
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
+
34
32
if ( this . project . isEmberCLIAddon ( ) ) {
35
33
return {
36
34
'ts:precompile' : require ( './lib/commands/precompile' ) ,
0 commit comments