Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion ember-basic-dropdown/blueprints/ember-basic-dropdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
// to us
},

afterInstall() {
async afterInstall() {
let dependencies = this.project.dependencies();
const promises = [];
let skipStyleImport = false;
Expand Down Expand Up @@ -71,6 +71,29 @@ module.exports = {
{},
),
);
} else {
applicationFile = path.join(templatePath, `application.gts`);
if (!fs.existsSync(applicationFile)) {
file = path.join(templatePath, `application.gjs`);
}
if (fs.existsSync(applicationFile)) {
this.ui.writeLine(`Added wormhole statement to ${applicationFile}`);
await this.insertIntoFile(
applicationFile,
`import BasicDropdownWormhole from 'ember-basic-dropdown/components/basic-dropdown-wormhole';${EOL}`,
{
before: '<template>',
},
);

await this.insertIntoFile(
applicationFile,
`${EOL} <BasicDropdownWormhole />`,
{
after: '<template>',
},
);
}
}

return Promise.all(promises);
Expand Down