Skip to content

Commit

Permalink
chore: add --no-examples option (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
karlhorky committed Mar 13, 2024
1 parent 22a512b commit fd3a0e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/cli.ts
Expand Up @@ -52,6 +52,7 @@ function _printHelp() {
--help: print this message
--browser=<name>: browsers to use in default config (default: 'chromium,firefox,webkit')
--no-browsers: do not download browsers (can be done manually via 'npx playwright install')
--no-examples: do not create example test files
--install-deps: install dependencies (default: false)
--next: install @next version of Playwright
--beta: install @beta version of Playwright
Expand Down
3 changes: 2 additions & 1 deletion src/generator.ts
Expand Up @@ -35,6 +35,7 @@ const assetsDir = path.join(__dirname, '..', 'assets');

type CliArgumentKey = 'browser'
| 'no-browsers'
| 'no-examples'
| 'next'
| 'beta'
| 'ct'
Expand Down Expand Up @@ -158,7 +159,7 @@ export class Generator {
sections.set(browserName, !this.options.browser || this.options.browser.includes(browserName) ? 'show' : 'comment');

let ctPackageName;
let installExamples = true;
let installExamples = !this.options['no-examples'];
if (answers.framework) {
ctPackageName = `@playwright/experimental-ct-${answers.framework}`;
installExamples = false;
Expand Down

0 comments on commit fd3a0e0

Please sign in to comment.