Skip to content

Commit

Permalink
docs(start): prompt about Ionic 4
Browse files Browse the repository at this point in the history
resolves #3597
  • Loading branch information
imhoffd committed Sep 26, 2018
1 parent 16a0111 commit 5071856
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/ionic/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,26 @@ ${chalk.cyan('[1]')}: ${chalk.bold('https://ionicframework.com/docs/cli/starters
options['git'] = true;
}

if (!options['type']) {
this.env.log.info(
`You are about to create an Ionic 3 app. Would you like to try Ionic 4 ${chalk.red.bold('(beta)')}?\n` +
`Ionic 4 uses the power of the modern Web and embraces the Angular CLI and Angular Router to bring you the best version of Ionic ever. See our blog announcement${chalk.cyan('[1]')} and documentation${chalk.cyan('[2]')} for more information. We'd love to hear your feedback on our latest version!\n\n` +
`${chalk.cyan('[1]')}: ${chalk.bold('https://blog.ionicframework.com/announcing-ionic-4-beta/')}\n` +
`${chalk.cyan('[2]')}: ${chalk.bold('https://beta.ionicframework.com/docs/')}\n`
);

const confirm = await this.env.prompt({
type: 'confirm',
name: 'confirm',
message: 'Try Ionic 4?',
default: false,
});

if (confirm) {
options['type'] = 'angular';
}
}

const projectType = options['type'] ? String(options['type']) : 'ionic-angular';
await this.validateProjectType(projectType);

Expand Down

0 comments on commit 5071856

Please sign in to comment.