From 745dd34eef1d2342992fb4564257398a472b5817 Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Tue, 7 Oct 2025 11:17:00 +0200 Subject: [PATCH 1/2] fix: ask for language and browser install --- src/cli.ts | 4 ++-- src/generator.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index 278d6b9..378eefa 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -24,7 +24,7 @@ program .name('create-playwright') .description('Getting started with writing end-to-end tests with Playwright.') .argument('[rootDir]', 'Target directory for the Playwright project', '.') - .option('--browser ', 'browsers to use in default config', ['chromium', 'firefox', 'webkit']) + .option('--browser ', 'browsers to use in default config') .option('--no-browsers', 'do not download browsers (can be done manually via \'npx playwright install\')') .option('--no-examples', 'do not create example test files') .option('--install-deps', 'install dependencies') @@ -33,7 +33,7 @@ program .option('--ct', 'install Playwright Component testing') .option('--quiet', 'do not ask for interactive input prompts') .option('--gha', 'install GitHub Actions') - .option('--lang ', 'language to use (js, TypeScript)', 'TypeScript') + .option('--lang ', 'language to use (js, TypeScript)') .action(async (rootDir, options) => { const cliOptions: CliOptions = { diff --git a/src/generator.ts b/src/generator.ts index 178d37e..ffd4643 100644 --- a/src/generator.ts +++ b/src/generator.ts @@ -35,8 +35,8 @@ export type PromptOptions = { const assetsDir = path.join(__dirname, '..', 'assets'); export type CliOptions = { - lang: string; - browser: string[]; + lang?: string; + browser?: string[]; noBrowsers?: boolean; noExamples?: boolean; installDeps?: boolean; From c62126cf15fd67bc67b6a80b6e04a4d5bd71804f Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Wed, 8 Oct 2025 08:55:02 +0200 Subject: [PATCH 2/2] Update src/cli.ts --- src/cli.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.ts b/src/cli.ts index 378eefa..0c048de 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -24,7 +24,7 @@ program .name('create-playwright') .description('Getting started with writing end-to-end tests with Playwright.') .argument('[rootDir]', 'Target directory for the Playwright project', '.') - .option('--browser ', 'browsers to use in default config') + .option('--browser ', `browsers to use in default config (default: 'chromium,firefox,webkit')`) .option('--no-browsers', 'do not download browsers (can be done manually via \'npx playwright install\')') .option('--no-examples', 'do not create example test files') .option('--install-deps', 'install dependencies')