File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
ember-basic-dropdown/blueprints/ember-basic-dropdown Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ module.exports = {
1212 // to us
1313 } ,
1414
15- afterInstall ( ) {
15+ async afterInstall ( ) {
1616 let dependencies = this . project . dependencies ( ) ;
1717 const promises = [ ] ;
1818 let skipStyleImport = false ;
@@ -71,6 +71,29 @@ module.exports = {
7171 { } ,
7272 ) ,
7373 ) ;
74+ } else {
75+ applicationFile = path . join ( templatePath , `application.gts` ) ;
76+ if ( ! fs . existsSync ( applicationFile ) ) {
77+ file = path . join ( templatePath , `application.gjs` ) ;
78+ }
79+ if ( fs . existsSync ( applicationFile ) ) {
80+ this . ui . writeLine ( `Added wormhole statement to ${ applicationFile } ` ) ;
81+ await this . insertIntoFile (
82+ applicationFile ,
83+ `import BasicDropdownWormhole from 'ember-basic-dropdown/components/basic-dropdown-wormhole';${ EOL } ` ,
84+ {
85+ before : '<template>' ,
86+ } ,
87+ ) ;
88+
89+ await this . insertIntoFile (
90+ applicationFile ,
91+ `${ EOL } <BasicDropdownWormhole />` ,
92+ {
93+ after : '<template>' ,
94+ } ,
95+ ) ;
96+ }
7497 }
7598
7699 return Promise . all ( promises ) ;
You can’t perform that action at this time.
0 commit comments