@@ -143,6 +143,13 @@ const FRAMEWORKS: Framework[] = [
143143 color : cyan ,
144144 customCommand : 'npm create react-router@latest TARGET_DIR' ,
145145 } ,
146+ {
147+ name : 'custom-tanstack-router' ,
148+ display : 'TanStack Router ↗' ,
149+ color : cyan ,
150+ customCommand :
151+ 'npm create -- tsrouter-app@latest TARGET_DIR --framework react' ,
152+ } ,
146153 ] ,
147154 } ,
148155 {
@@ -223,6 +230,13 @@ const FRAMEWORKS: Framework[] = [
223230 display : 'JavaScript' ,
224231 color : yellow ,
225232 } ,
233+ {
234+ name : 'custom-tanstack-router' ,
235+ display : 'TanStack Router ↗' ,
236+ color : cyan ,
237+ customCommand :
238+ 'npm create -- tsrouter-app@latest TARGET_DIR --framework solid' ,
239+ } ,
226240 ] ,
227241 } ,
228242 {
@@ -606,13 +620,20 @@ function getFullCustomCommand(customCommand: string, pkgInfo?: PkgInfo) {
606620
607621 return (
608622 customCommand
609- . replace ( / ^ n p m c r e a t e / , ( ) => {
623+ . replace ( / ^ n p m c r e a t e (?: - - ) ? / , ( ) => {
610624 // `bun create` uses it's own set of templates,
611625 // the closest alternative is using `bun x` directly on the package
612626 if ( pkgManager === 'bun' ) {
613627 return 'bun x create-'
614628 }
615- return `${ pkgManager } create `
629+ // pnpm doesn't support the -- syntax
630+ if ( pkgManager === 'pnpm' ) {
631+ return 'pnpm create '
632+ }
633+ // For other package managers, preserve the original format
634+ return customCommand . startsWith ( 'npm create -- ' )
635+ ? `${ pkgManager } create -- `
636+ : `${ pkgManager } create `
616637 } )
617638 // Only Yarn 1.x doesn't support `@version` in the `create` command
618639 . replace ( '@latest' , ( ) => ( isYarn1 ? '' : '@latest' ) )
0 commit comments