Skip to content

Commit

Permalink
fix: init standalone-app if no templates are selected (#594)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Goberling <mgoberling@Michaels-MacBook-Pro-3.local>
  • Loading branch information
MichaelGoberling and Michael Goberling authored Oct 4, 2022
1 parent 6d5c29d commit 9f8b4a1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/commands/app/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ class InitCommand extends TemplatesCommand {

// 2. prompt for templates to be installed
const templates = await this.getTemplatesForFlags(flags)
// If no templates selected, init a standalone app
if (templates.length <= 0) {
flags['standalone-app'] = true
}

// 3. run base code generators
const projectName = (consoleConfig && consoleConfig.project.name) || path.basename(process.cwd())
Expand Down Expand Up @@ -138,6 +142,10 @@ class InitCommand extends TemplatesCommand {

// 5. get list of templates to install
const templates = await this.getTemplatesForFlags(flags, orgSupportedServices)
// If no templates selected, init a standalone app
if (templates.length <= 0) {
flags['standalone-app'] = true
}

// 6. download workspace config
const consoleConfig = await consoleCLI.getWorkspaceConfig(org.id, project.id, workspace.id, orgSupportedServices)
Expand Down

0 comments on commit 9f8b4a1

Please sign in to comment.