@@ -57,6 +57,7 @@ async function init() {
5757 // --with-tests / --tests (equals to `--vitest --cypress`)
5858 // --vitest
5959 // --cypress
60+ // --playwright
6061 // --eslint
6162 // --eslint-with-prettier (only support prettier through eslint for simplicity)
6263 // --force (for force overwriting)
@@ -82,6 +83,7 @@ async function init() {
8283 argv . tests ||
8384 argv . vitest ||
8485 argv . cypress ||
86+ argv . playwright ||
8587 argv . eslint
8688 ) === 'boolean'
8789
@@ -102,6 +104,7 @@ async function init() {
102104 // - Install Vue Router for SPA development?
103105 // - Install Pinia for state management?
104106 // - Add Cypress for testing?
107+ // - Add Playwright for end-to-end testing?
105108 // - Add ESLint for code quality?
106109 // - Add Prettier for code formatting?
107110 result = await prompts (
@@ -190,6 +193,14 @@ async function init() {
190193 active : 'Yes' ,
191194 inactive : 'No'
192195 } ,
196+ {
197+ name : 'needsPlaywright' ,
198+ type : ( ) => ( isFeatureFlagsUsed ? null : 'toggle' ) ,
199+ message : 'Add Playwright for End-to-End testing?' ,
200+ initial : false ,
201+ active : 'Yes' ,
202+ inactive : 'No'
203+ } ,
193204 {
194205 name : 'needsEslint' ,
195206 type : ( ) => ( isFeatureFlagsUsed ? null : 'toggle' ) ,
@@ -234,6 +245,7 @@ async function init() {
234245 needsRouter = argv . router ,
235246 needsPinia = argv . pinia ,
236247 needsCypress = argv . cypress || argv . tests ,
248+ needsPlaywright = argv . playwright ,
237249 needsVitest = argv . vitest || argv . tests ,
238250 needsEslint = argv . eslint || argv [ 'eslint-with-prettier' ] ,
239251 needsPrettier = argv [ 'eslint-with-prettier' ]
@@ -284,6 +296,9 @@ async function init() {
284296 if ( needsCypressCT ) {
285297 render ( 'config/cypress-ct' )
286298 }
299+ if ( needsPlaywright ) {
300+ render ( 'config/playwright' )
301+ }
287302 if ( needsTypeScript ) {
288303 render ( 'config/typescript' )
289304
@@ -385,6 +400,7 @@ async function init() {
385400 needsTypeScript,
386401 needsVitest,
387402 needsCypress,
403+ needsPlaywright,
388404 needsCypressCT,
389405 needsEslint
390406 } )
0 commit comments