File tree Expand file tree Collapse file tree
ember-basic-dropdown/blueprints/ember-basic-dropdown Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,12 @@ module.exports = {
4949 if ( ! fs . existsSync ( file ) ) {
5050 file = path . join ( 'app' , `app.ts` ) ;
5151 }
52+ if ( ! fs . existsSync ( file ) ) {
53+ file = path . join ( 'app' , `app.gts` ) ;
54+ }
55+ if ( ! fs . existsSync ( file ) ) {
56+ file = path . join ( 'app' , `app.gjs` ) ;
57+ }
5258 if ( fs . existsSync ( file ) ) {
5359 this . ui . writeLine ( `Added import statement to ${ file } ` ) ;
5460 promises . push (
@@ -71,6 +77,24 @@ module.exports = {
7177 { } ,
7278 ) ,
7379 ) ;
80+ } else {
81+ applicationFile = path . join ( templatePath , `application.gts` ) ;
82+ if ( ! fs . existsSync ( file ) ) {
83+ file = path . join ( templatePath , `application.gjs` ) ;
84+ }
85+ if ( fs . existsSync ( applicationFile ) ) {
86+ this . ui . writeLine ( `Added wormhole statement to ${ applicationFile } ` ) ;
87+ promises . push (
88+ this . insertIntoFile ( applicationFile , `import BasicDropdownWormhole from 'ember-basic-dropdown/components/basic-dropdown-wormhole';${ EOL } ` , {
89+ before : `<template>` ,
90+ } ) ,
91+ ) ;
92+ promises . push (
93+ this . insertIntoFile ( applicationFile , `${ EOL } <BasicDropdownWormhole />` , {
94+ after : `<template>` ,
95+ } ) ,
96+ ) ;
97+ }
7498 }
7599
76100 return Promise . all ( promises ) ;
You can’t perform that action at this time.
0 commit comments