@@ -73,13 +73,13 @@ const FRAMEWORKS: Framework[] = [
73
73
} ,
74
74
{
75
75
name : 'custom-create-vue' ,
76
- display : 'Customize with create-vue' ,
76
+ display : 'Customize with create-vue ↗ ' ,
77
77
color : green ,
78
78
customCommand : 'npm create vue@latest TARGET_DIR'
79
79
} ,
80
80
{
81
81
name : 'custom-nuxt' ,
82
- display : 'Nuxt' ,
82
+ display : 'Nuxt ↗ ' ,
83
83
color : lightGreen ,
84
84
customCommand : 'npm exec nuxi init TARGET_DIR'
85
85
}
@@ -153,11 +153,24 @@ const FRAMEWORKS: Framework[] = [
153
153
} ,
154
154
{
155
155
name : 'custom-svelte-kit' ,
156
- display : 'SvelteKit' ,
156
+ display : 'SvelteKit ↗ ' ,
157
157
color : red ,
158
158
customCommand : 'npm create svelte@latest TARGET_DIR'
159
159
}
160
160
]
161
+ } ,
162
+ {
163
+ name : 'others' ,
164
+ display : 'Others' ,
165
+ color : reset ,
166
+ variants : [
167
+ {
168
+ name : 'create-vite-extra' ,
169
+ display : 'create-vite-extra ↗' ,
170
+ color : reset ,
171
+ customCommand : 'npm create vite-extra@latest TARGET_DIR'
172
+ }
173
+ ]
161
174
}
162
175
]
163
176
@@ -279,14 +292,15 @@ async function init() {
279
292
}
280
293
281
294
// determine template
282
- const template : string = variant || framework || argTemplate
295
+ const template : string = variant || framework ?. name || argTemplate
283
296
284
297
const pkgInfo = pkgFromUserAgent ( process . env . npm_config_user_agent )
285
298
const pkgManager = pkgInfo ? pkgInfo . name : 'npm'
286
299
const isYarn1 = pkgManager === 'yarn' && pkgInfo ?. version . startsWith ( '1.' )
287
300
288
301
const { customCommand } =
289
302
FRAMEWORKS . flatMap ( ( f ) => f . variants ) . find ( ( v ) => v . name === template ) ?? { }
303
+
290
304
if ( customCommand ) {
291
305
const fullCustomCommand = customCommand
292
306
. replace ( 'TARGET_DIR' , targetDir )
0 commit comments