@@ -83,6 +83,7 @@ async function init() {
8383 // --playwright
8484 // --eslint
8585 // --eslint-with-prettier (only support prettier through eslint for simplicity)
86+ // --vue-devtools / --devtools
8687 // --force (for force overwriting)
8788
8889 const args = process . argv . slice ( 2 )
@@ -94,7 +95,9 @@ async function init() {
9495 'with-tests' : { type : 'boolean' } ,
9596 tests : { type : 'boolean' } ,
9697 'vue-router' : { type : 'boolean' } ,
97- router : { type : 'boolean' }
98+ router : { type : 'boolean' } ,
99+ 'vue-devtools' : { type : 'boolean' } ,
100+ devtools : { type : 'boolean' }
98101 } as const
99102
100103 const { values : argv } = parseArgs ( {
@@ -116,7 +119,8 @@ async function init() {
116119 argv . cypress ??
117120 argv . nightwatch ??
118121 argv . playwright ??
119- argv . eslint
122+ argv . eslint ??
123+ ( argv . devtools || argv [ 'vue-devtools' ] )
120124 ) === 'boolean'
121125
122126 let targetDir = args [ 0 ]
@@ -138,6 +142,7 @@ async function init() {
138142 needsE2eTesting ? : false | 'cypress' | 'nightwatch' | 'playwright'
139143 needsEslint ? : boolean
140144 needsPrettier ? : boolean
145+ needsDevTools ? : boolean
141146 } = { }
142147
143148 try {
@@ -154,6 +159,7 @@ async function init() {
154159 // - Add Playwright for end-to-end testing?
155160 // - Add ESLint for code quality?
156161 // - Add Prettier for code formatting?
162+ // - Add Vue DevTools extension for debugging? (experimental)
157163 result = await prompts (
158164 [
159165 {
@@ -285,6 +291,14 @@ async function init() {
285291 initial : false ,
286292 active : language . defaultToggleOptions . active ,
287293 inactive : language . defaultToggleOptions . inactive
294+ } ,
295+ {
296+ name : 'needsDevTools' ,
297+ type : ( ) => ( isFeatureFlagsUsed ? null : 'toggle' ) ,
298+ message : language . needsDevTools . message ,
299+ initial : false ,
300+ active : language . defaultToggleOptions . active ,
301+ inactive : language . defaultToggleOptions . inactive
288302 }
289303 ] ,
290304 {
@@ -305,12 +319,13 @@ async function init() {
305319 packageName = projectName ?? defaultProjectName ,
306320 shouldOverwrite = argv . force ,
307321 needsJsx = argv . jsx ,
308- needsTypeScript = argv . typescript ,
309- needsRouter = argv . router ,
322+ needsTypeScript = argv . ts || argv . typescript ,
323+ needsRouter = argv . router || argv [ 'vue-router' ] ,
310324 needsPinia = argv . pinia ,
311325 needsVitest = argv . vitest || argv . tests ,
312326 needsEslint = argv . eslint || argv [ 'eslint-with-prettier' ] ,
313- needsPrettier = argv [ 'eslint-with-prettier' ]
327+ needsPrettier = argv [ 'eslint-with-prettier' ] ,
328+ needsDevTools = argv . devtools || argv [ 'vue-devtools' ]
314329 } = result
315330
316331 const { needsE2eTesting } = result
@@ -453,6 +468,10 @@ async function init() {
453468 if ( needsPrettier ) {
454469 render ( 'config/prettier' )
455470 }
471+
472+ if ( needsDevTools ) {
473+ render ( 'config/devtools' )
474+ }
456475 // Render code template.
457476 // prettier-ignore
458477 const codeTemplate =
0 commit comments