@@ -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)
@@ -81,6 +82,7 @@ async function init() {
81
82
argv . tests ??
82
83
argv . vitest ??
83
84
argv . cypress ??
85
+ argv . playwright ??
84
86
argv . eslint
85
87
) === 'boolean'
86
88
@@ -101,6 +103,7 @@ async function init() {
101
103
// - Install Vue Router for SPA development?
102
104
// - Install Pinia for state management?
103
105
// - Add Cypress for testing?
106
+ // - Add Playwright for end-to-end testing?
104
107
// - Add ESLint for code quality?
105
108
// - Add Prettier for code formatting?
106
109
result = await prompts (
@@ -189,6 +192,14 @@ async function init() {
189
192
active : 'Yes' ,
190
193
inactive : 'No'
191
194
} ,
195
+ {
196
+ name : 'needsPlaywright' ,
197
+ type : ( ) => ( isFeatureFlagsUsed ? null : 'toggle' ) ,
198
+ message : 'Add Playwright for End-to-End testing?' ,
199
+ initial : false ,
200
+ active : 'Yes' ,
201
+ inactive : 'No'
202
+ } ,
192
203
{
193
204
name : 'needsEslint' ,
194
205
type : ( ) => ( isFeatureFlagsUsed ? null : 'toggle' ) ,
@@ -233,6 +244,7 @@ async function init() {
233
244
needsRouter = argv . router ,
234
245
needsPinia = argv . pinia ,
235
246
needsCypress = argv . cypress || argv . tests ,
247
+ needsPlaywright = argv . playwright ,
236
248
needsVitest = argv . vitest || argv . tests ,
237
249
needsEslint = argv . eslint || argv [ 'eslint-with-prettier' ] ,
238
250
needsPrettier = argv [ 'eslint-with-prettier' ]
@@ -283,6 +295,9 @@ async function init() {
283
295
if ( needsCypressCT ) {
284
296
render ( 'config/cypress-ct' )
285
297
}
298
+ if ( needsPlaywright ) {
299
+ render ( 'config/playwright' )
300
+ }
286
301
if ( needsTypeScript ) {
287
302
render ( 'config/typescript' )
288
303
@@ -384,6 +399,7 @@ async function init() {
384
399
needsTypeScript,
385
400
needsVitest,
386
401
needsCypress,
402
+ needsPlaywright,
387
403
needsCypressCT,
388
404
needsEslint
389
405
} )
0 commit comments