@@ -56,6 +56,7 @@ async function init() {
56
56
// --with-tests / --tests (equals to `--vitest --cypress`)
57
57
// --vitest
58
58
// --cypress
59
+ // --playwright
59
60
// --eslint
60
61
// --eslint-with-prettier (only support prettier through eslint for simplicity)
61
62
// --force (for force overwriting)
@@ -80,6 +81,7 @@ async function init() {
80
81
argv . tests ??
81
82
argv . vitest ??
82
83
argv . cypress ??
84
+ argv . playwright ??
83
85
argv . eslint
84
86
) === 'boolean'
85
87
@@ -112,6 +114,7 @@ async function init() {
112
114
// - Install Vue Router for SPA development?
113
115
// - Install Pinia for state management?
114
116
// - Add Cypress for testing?
117
+ // - Add Playwright for end-to-end testing?
115
118
// - Add ESLint for code quality?
116
119
// - Add Prettier for code formatting?
117
120
result = await prompts (
@@ -200,6 +203,14 @@ async function init() {
200
203
active : 'Yes' ,
201
204
inactive : 'No'
202
205
} ,
206
+ {
207
+ name : 'needsPlaywright' ,
208
+ type : ( ) => ( isFeatureFlagsUsed ? null : 'toggle' ) ,
209
+ message : 'Add Playwright for End-to-End testing?' ,
210
+ initial : false ,
211
+ active : 'Yes' ,
212
+ inactive : 'No'
213
+ } ,
203
214
{
204
215
name : 'needsEslint' ,
205
216
type : ( ) => ( isFeatureFlagsUsed ? null : 'toggle' ) ,
@@ -244,6 +255,7 @@ async function init() {
244
255
needsRouter = argv . router ,
245
256
needsPinia = argv . pinia ,
246
257
needsCypress = argv . cypress || argv . tests ,
258
+ needsPlaywright = argv . playwright ,
247
259
needsVitest = argv . vitest || argv . tests ,
248
260
needsEslint = argv . eslint || argv [ 'eslint-with-prettier' ] ,
249
261
needsPrettier = argv [ 'eslint-with-prettier' ]
@@ -294,6 +306,9 @@ async function init() {
294
306
if ( needsCypressCT ) {
295
307
render ( 'config/cypress-ct' )
296
308
}
309
+ if ( needsPlaywright ) {
310
+ render ( 'config/playwright' )
311
+ }
297
312
if ( needsTypeScript ) {
298
313
render ( 'config/typescript' )
299
314
@@ -395,6 +410,7 @@ async function init() {
395
410
needsTypeScript,
396
411
needsVitest,
397
412
needsCypress,
413
+ needsPlaywright,
398
414
needsCypressCT,
399
415
needsEslint
400
416
} )
0 commit comments