Skip to content

Commit de8d028

Browse files
feat(integrations): add ng add cordova-builder (#4823)
* feat(integrations): add ng add cordova-builder * Update packages/@ionic/cli/src/lib/integrations/cordova/index.ts Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com> * Update packages/@ionic/cli/src/lib/integrations/cordova/index.ts Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com> * chore(): nit Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
1 parent 441df17 commit de8d028

File tree

1 file changed

+8
-0
lines changed
  • packages/@ionic/cli/src/lib/integrations/cordova

1 file changed

+8
-0
lines changed

packages/@ionic/cli/src/lib/integrations/cordova/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ export class Integration extends BaseIntegration<ProjectIntegration> {
120120
},
121121
});
122122
await super.add(details);
123+
if (this.e.project.type === 'angular') {
124+
try {
125+
const integration = this.e.project.requireIntegration(this.name);
126+
await this.e.shell.run('ng', ['add', '@ionic/cordova-builders', '--skip-confirmation'], { cwd: integration.root });
127+
} catch (e) {
128+
debug('Error while adding @ionic/cordova-builders: %O', e);
129+
}
130+
}
123131
}
124132

125133
async getCordovaConfig(): Promise<configlib.CordovaConfig | undefined> {

0 commit comments

Comments
 (0)