Skip to content

Commit

Permalink
feat(wizard): add paid user confrimation, #724
Browse files Browse the repository at this point in the history
  • Loading branch information
wnvko committed May 21, 2020
1 parent bbcdaf3 commit dd13d21
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/core/prompt/BasePromptSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,22 @@ export abstract class BasePromptSession {
break;
case "Complete & Run":
const config = ProjectConfig.localConfig();

if (config.project.framework === "angular" && !config.packagesInstalled) {
// TODO: should we add check if there are paid components at all
const usePaidAngular = await this.getUserInput({
type: "list",
name: "usePaidAngular",
message: "Do you have paid subscription:",
choices: [ "yes", "no" ],
default: "yes"
});

if (usePaidAngular === "yes") {
// TODO call packages/igx-templates/Update.updateWorkspace() when ready
}
}

const defaultPort = config.project.defaultPort;
const port = await this.getUserInput({
type: "input",
Expand All @@ -386,6 +402,7 @@ export abstract class BasePromptSession {
});
config.project.defaultPort = parseInt(port, 10);
ProjectConfig.setConfig(config);

await this.completeAndRun(config.project.defaultPort);
break;
}
Expand Down

0 comments on commit dd13d21

Please sign in to comment.