Skip to content

Commit

Permalink
feat: run add-vscode-config generator on app init (retooled local deb…
Browse files Browse the repository at this point in the history
…ugging) (#798)
  • Loading branch information
shazron authored Apr 30, 2024
1 parent e9d4bf8 commit 3e4f4f7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@adobe/aio-lib-runtime": "^6",
"@adobe/aio-lib-templates": "^3",
"@adobe/aio-lib-web": "^7",
"@adobe/generator-aio-app": "^7",
"@adobe/generator-aio-app": "^8",
"@adobe/generator-app-common-lib": "^2",
"@adobe/inquirer-table-checkbox": "^2",
"@oclif/core": "^2.11.6",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/app/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class InitCommand extends TemplatesCommand {

getInitialGenerators (flags) {
// TODO read from config to override
const initialGenerators = ['base-app', 'add-ci']
const initialGenerators = ['base-app', 'add-ci', 'add-vscode-config']

if (flags['standalone-app']) {
initialGenerators.push('application')
Expand Down
6 changes: 3 additions & 3 deletions test/commands/app/init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ describe('--no-login', () => {
await command.run()

expect(command.installTemplates).toHaveBeenCalledWith(installOptions)
expect(command.runCodeGenerators).toHaveBeenCalledWith(['base-app', 'add-ci', 'application'], false, 'cwd', 'basic')
expect(command.runCodeGenerators).toHaveBeenCalledWith(['base-app', 'add-ci', 'add-vscode-config', 'application'], false, 'cwd', 'basic')
expect(LibConsoleCLI.init).not.toHaveBeenCalled()
expect(importHelperLib.importConfigJson).not.toHaveBeenCalled()
})
Expand Down Expand Up @@ -464,7 +464,7 @@ describe('--no-login', () => {
await command.run()

expect(command.installTemplates).toHaveBeenCalledWith(installOptions)
expect(command.runCodeGenerators).toHaveBeenCalledWith(['base-app', 'add-ci', 'application'], true, 'cwd', 'none')
expect(command.runCodeGenerators).toHaveBeenCalledWith(['base-app', 'add-ci', 'add-vscode-config', 'application'], true, 'cwd', 'none')
expect(LibConsoleCLI.init).not.toHaveBeenCalled()
expect(importHelperLib.importConfigJson).not.toHaveBeenCalled()
})
Expand All @@ -482,7 +482,7 @@ describe('--no-login', () => {
await command.run()

expect(command.installTemplates).toHaveBeenCalledWith(installOptions)
expect(command.runCodeGenerators).toHaveBeenCalledWith(['base-app', 'add-ci', 'application'], true, 'cwd', 'adobe-recommended')
expect(command.runCodeGenerators).toHaveBeenCalledWith(['base-app', 'add-ci', 'add-vscode-config', 'application'], true, 'cwd', 'adobe-recommended')
expect(LibConsoleCLI.init).not.toHaveBeenCalled()
expect(importHelperLib.importConfigJson).not.toHaveBeenCalled()
})
Expand Down

0 comments on commit 3e4f4f7

Please sign in to comment.