diff --git a/packages/shadcn/src/commands/init.ts b/packages/shadcn/src/commands/init.ts
index ae2c60e198..641c4f10c0 100644
--- a/packages/shadcn/src/commands/init.ts
+++ b/packages/shadcn/src/commands/init.ts
@@ -453,6 +453,11 @@ export async function runInit(
options.isNewProject || projectInfo?.framework.name === "next-app",
})
+ // Run postInit for new projects without a custom init (e.g. git init).
+ if (selectedTemplate) {
+ await selectedTemplate.postInit({ projectPath: options.cwd })
+ }
+
return fullConfig
}
diff --git a/packages/tests/src/tests/init.test.ts b/packages/tests/src/tests/init.test.ts
index 6a0a0d60c4..7ae1ff6b67 100644
--- a/packages/tests/src/tests/init.test.ts
+++ b/packages/tests/src/tests/init.test.ts
@@ -551,7 +551,7 @@ describe("shadcn init - next-monorepo", () => {
"--preset",
"radix-nova",
],
- { timeout: 300000 }
+ { timeout: 300000, debug: true }
)
expect(result.exitCode).toBe(0)
diff --git a/templates/start-app/src/routes/__root.tsx b/templates/start-app/src/routes/__root.tsx
index 37317c804a..c6988c007e 100644
--- a/templates/start-app/src/routes/__root.tsx
+++ b/templates/start-app/src/routes/__root.tsx
@@ -2,8 +2,6 @@ import { HeadContent, Scripts, createRootRoute } from "@tanstack/react-router"
import { TanStackRouterDevtoolsPanel } from "@tanstack/react-router-devtools"
import { TanStackDevtools } from "@tanstack/react-devtools"
-import Header from "../components/Header"
-
import appCss from "../styles.css?url"
export const Route = createRootRoute({
@@ -37,7 +35,6 @@ function RootDocument({ children }: { children: React.ReactNode }) {