@@ -31,7 +31,7 @@ function stripExamplesFromOptions(options: Options): Options {
3131 ! isDemoFilePath ( route . path ) &&
3232 ! ( route . url && route . url . startsWith ( '/demo' ) ) ,
3333 )
34-
34+
3535 const filteredIntegrations = ( addOn . integrations || [ ] ) . filter (
3636 ( integration ) => ! isDemoFilePath ( integration . path )
3737 )
@@ -277,6 +277,37 @@ async function runCommandsAndInstallDependencies(
277277 await installShadcnComponents ( environment , options . targetDir , options )
278278
279279 await setupIntent ( environment , options . targetDir , options )
280+
281+ if ( shouldGenerateRoutes ( options ) ) {
282+ s . start ( `Generating route tree...` )
283+ const command = getPackageManagerScriptCommand ( options . packageManager , [
284+ 'generate-routes' ,
285+ ] )
286+ const cmd = formatCommand ( command )
287+ environment . startStep ( {
288+ id : 'generate-routes' ,
289+ type : 'command' ,
290+ message : cmd ,
291+ } )
292+ await environment . execute (
293+ command . command ,
294+ command . args ,
295+ options . targetDir ,
296+ {
297+ inherit : true ,
298+ } ,
299+ )
300+ environment . finishStep ( 'generate-routes' , 'Route tree generated' )
301+ s . stop ( `Route tree generated` )
302+ }
303+ }
304+
305+ function shouldGenerateRoutes ( options : Options ) {
306+ return (
307+ options . install !== false &&
308+ options . mode === 'file-router' &&
309+ ( options . framework . id === 'react' || options . framework . id === 'solid' )
310+ )
280311}
281312
282313async function seedEnvValues ( environment : Environment , options : Options ) {
0 commit comments