@@ -57,6 +57,7 @@ async function init() {
57
57
// --with-tests / --tests (equals to `--vitest --cypress`)
58
58
// --vitest
59
59
// --cypress
60
+ // --playwright
60
61
// --eslint
61
62
// --eslint-with-prettier (only support prettier through eslint for simplicity)
62
63
// --force (for force overwriting)
@@ -82,6 +83,7 @@ async function init() {
82
83
argv . tests ||
83
84
argv . vitest ||
84
85
argv . cypress ||
86
+ argv . playwright ||
85
87
argv . eslint
86
88
) === 'boolean'
87
89
@@ -102,6 +104,7 @@ async function init() {
102
104
// - Install Vue Router for SPA development?
103
105
// - Install Pinia for state management?
104
106
// - Add Cypress for testing?
107
+ // - Add Playwright for end-to-end testing?
105
108
// - Add ESLint for code quality?
106
109
// - Add Prettier for code formatting?
107
110
result = await prompts (
@@ -190,6 +193,14 @@ async function init() {
190
193
active : 'Yes' ,
191
194
inactive : 'No'
192
195
} ,
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
+ } ,
193
204
{
194
205
name : 'needsEslint' ,
195
206
type : ( ) => ( isFeatureFlagsUsed ? null : 'toggle' ) ,
@@ -234,6 +245,7 @@ async function init() {
234
245
needsRouter = argv . router ,
235
246
needsPinia = argv . pinia ,
236
247
needsCypress = argv . cypress || argv . tests ,
248
+ needsPlaywright = argv . playwright ,
237
249
needsVitest = argv . vitest || argv . tests ,
238
250
needsEslint = argv . eslint || argv [ 'eslint-with-prettier' ] ,
239
251
needsPrettier = argv [ 'eslint-with-prettier' ]
@@ -284,6 +296,9 @@ async function init() {
284
296
if ( needsCypressCT ) {
285
297
render ( 'config/cypress-ct' )
286
298
}
299
+ if ( needsPlaywright ) {
300
+ render ( 'config/playwright' )
301
+ }
287
302
if ( needsTypeScript ) {
288
303
render ( 'config/typescript' )
289
304
@@ -385,6 +400,7 @@ async function init() {
385
400
needsTypeScript,
386
401
needsVitest,
387
402
needsCypress,
403
+ needsPlaywright,
388
404
needsCypressCT,
389
405
needsEslint
390
406
} )
0 commit comments