@@ -108,6 +108,7 @@ async function init() {
108
108
argv . nightwatch ??
109
109
argv . playwright ??
110
110
argv . eslint ??
111
+ argv . storybook ??
111
112
argv . vueUse
112
113
) === 'boolean'
113
114
@@ -129,6 +130,7 @@ async function init() {
129
130
needsEslint ? : boolean
130
131
needsPrettier ? : boolean
131
132
needsVueUse ? : boolean
133
+ needsStorybook ? : boolean
132
134
} = { }
133
135
134
136
try {
@@ -145,6 +147,8 @@ async function init() {
145
147
// - Add Playwright for end-to-end testing?
146
148
// - Add ESLint for code quality?
147
149
// - Add Prettier for code formatting?
150
+ // - Add VueUse - Collection of essential Composition Utilities?
151
+ // - Add Storybook?
148
152
result = await prompts (
149
153
[
150
154
{
@@ -275,6 +279,14 @@ async function init() {
275
279
initial : false ,
276
280
active : 'Yes' ,
277
281
inactive : 'No'
282
+ } ,
283
+ {
284
+ name : 'needsStorybook' ,
285
+ type : ( ) => ( isFeatureFlagsUsed ? null : 'toggle' ) ,
286
+ message : 'Add Storybook?' ,
287
+ initial : false ,
288
+ active : 'Yes' ,
289
+ inactive : 'No'
278
290
}
279
291
] ,
280
292
{
@@ -301,7 +313,8 @@ async function init() {
301
313
needsVitest = argv . vitest || argv . tests ,
302
314
needsEslint = argv . eslint || argv [ 'eslint-with-prettier' ] ,
303
315
needsPrettier = argv [ 'eslint-with-prettier' ] ,
304
- needsVueUse = argv . vueUse
316
+ needsVueUse = argv . vueUse ,
317
+ needsStorybook = argv . storybook
305
318
} = result
306
319
307
320
const { needsE2eTesting } = result
@@ -507,7 +520,8 @@ async function init() {
507
520
needsPlaywright,
508
521
needsNightwatchCT,
509
522
needsCypressCT,
510
- needsEslint
523
+ needsEslint,
524
+ needsStorybook
511
525
} )
512
526
)
513
527
@@ -522,6 +536,9 @@ async function init() {
522
536
if ( needsPrettier ) {
523
537
console . log ( ` ${ bold ( green ( getCommand ( packageManager , 'format' ) ) ) } ` )
524
538
}
539
+ if ( needsStorybook ) {
540
+ console . log ( ` ${ bold ( green ( 'npx storybook@latest init --builder vite' ) ) } ` )
541
+ }
525
542
console . log ( ` ${ bold ( green ( getCommand ( packageManager , 'dev' ) ) ) } ` )
526
543
console . log ( )
527
544
}
0 commit comments