From 74b2f294f3ecbb42f4a17683d16109e2c2c6293f Mon Sep 17 00:00:00 2001 From: Zoltan Fodor Date: Fri, 22 Nov 2024 14:49:41 +0100 Subject: [PATCH] chore: use app/globals.css instead of styles/globals.css --- cli/src/installers/tailwind.ts | 4 ++-- cli/template/extras/src/app/layout/base.tsx | 2 +- cli/template/extras/src/app/layout/with-trpc-tw.tsx | 2 +- cli/template/extras/src/app/layout/with-trpc.tsx | 2 +- cli/template/extras/src/app/layout/with-tw.tsx | 2 +- cli/template/extras/src/{styles => }/globals.css | 0 cli/template/extras/src/pages/_app/base.tsx | 2 +- cli/template/extras/src/pages/_app/with-auth-trpc-tw.tsx | 2 +- cli/template/extras/src/pages/_app/with-auth-trpc.tsx | 2 +- cli/template/extras/src/pages/_app/with-auth-tw.tsx | 2 +- cli/template/extras/src/pages/_app/with-auth.tsx | 2 +- cli/template/extras/src/pages/_app/with-trpc-tw.tsx | 2 +- cli/template/extras/src/pages/_app/with-trpc.tsx | 2 +- cli/template/extras/src/pages/_app/with-tw.tsx | 2 +- upgrade/src/app/layout.tsx | 2 +- www/src/components/docs/folderStructureDiagramApp.astro | 2 +- www/src/components/docs/folderStructureDiagramPages.astro | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) rename cli/template/extras/src/{styles => }/globals.css (100%) diff --git a/cli/src/installers/tailwind.ts b/cli/src/installers/tailwind.ts index 86188a241d..a0db72a140 100644 --- a/cli/src/installers/tailwind.ts +++ b/cli/src/installers/tailwind.ts @@ -29,8 +29,8 @@ export const tailwindInstaller: Installer = ({ projectDir }) => { const prettierSrc = path.join(extrasDir, "config/_prettier.config.js"); const prettierDest = path.join(projectDir, "prettier.config.js"); - const cssSrc = path.join(extrasDir, "src/styles/globals.css"); - const cssDest = path.join(projectDir, "src/styles/globals.css"); + const cssSrc = path.join(extrasDir, "src/globals.css"); + const cssDest = path.join(projectDir, "src/globals.css"); // add format:* scripts to package.json const packageJsonPath = path.join(projectDir, "package.json"); diff --git a/cli/template/extras/src/app/layout/base.tsx b/cli/template/extras/src/app/layout/base.tsx index 90afc8e529..2c6d8f7e5e 100644 --- a/cli/template/extras/src/app/layout/base.tsx +++ b/cli/template/extras/src/app/layout/base.tsx @@ -1,4 +1,4 @@ -import "~/styles/globals.css"; +import "~/globals.css"; import { GeistSans } from "geist/font/sans"; import { type Metadata } from "next"; diff --git a/cli/template/extras/src/app/layout/with-trpc-tw.tsx b/cli/template/extras/src/app/layout/with-trpc-tw.tsx index c2215fff12..c9e6b49878 100644 --- a/cli/template/extras/src/app/layout/with-trpc-tw.tsx +++ b/cli/template/extras/src/app/layout/with-trpc-tw.tsx @@ -1,4 +1,4 @@ -import "~/styles/globals.css"; +import "~/globals.css"; import { GeistSans } from "geist/font/sans"; import { type Metadata } from "next"; diff --git a/cli/template/extras/src/app/layout/with-trpc.tsx b/cli/template/extras/src/app/layout/with-trpc.tsx index 56d99f3f6c..fe3dae8c07 100644 --- a/cli/template/extras/src/app/layout/with-trpc.tsx +++ b/cli/template/extras/src/app/layout/with-trpc.tsx @@ -1,4 +1,4 @@ -import "~/styles/globals.css"; +import "~/globals.css"; import { GeistSans } from "geist/font/sans"; import { type Metadata } from "next"; diff --git a/cli/template/extras/src/app/layout/with-tw.tsx b/cli/template/extras/src/app/layout/with-tw.tsx index 42ed47ce56..9a46e86edf 100644 --- a/cli/template/extras/src/app/layout/with-tw.tsx +++ b/cli/template/extras/src/app/layout/with-tw.tsx @@ -1,4 +1,4 @@ -import "~/styles/globals.css"; +import "~/globals.css"; import { GeistSans } from "geist/font/sans"; import { type Metadata } from "next"; diff --git a/cli/template/extras/src/styles/globals.css b/cli/template/extras/src/globals.css similarity index 100% rename from cli/template/extras/src/styles/globals.css rename to cli/template/extras/src/globals.css diff --git a/cli/template/extras/src/pages/_app/base.tsx b/cli/template/extras/src/pages/_app/base.tsx index e7e7fb2983..8ffec14210 100644 --- a/cli/template/extras/src/pages/_app/base.tsx +++ b/cli/template/extras/src/pages/_app/base.tsx @@ -1,7 +1,7 @@ import { GeistSans } from "geist/font/sans"; import { type AppType } from "next/dist/shared/lib/utils"; -import "~/styles/globals.css"; +import "~/globals.css"; const MyApp: AppType = ({ Component, pageProps }) => { return ( diff --git a/cli/template/extras/src/pages/_app/with-auth-trpc-tw.tsx b/cli/template/extras/src/pages/_app/with-auth-trpc-tw.tsx index 89d10b0c08..76b330e00d 100644 --- a/cli/template/extras/src/pages/_app/with-auth-trpc-tw.tsx +++ b/cli/template/extras/src/pages/_app/with-auth-trpc-tw.tsx @@ -5,7 +5,7 @@ import { type AppType } from "next/app"; import { api } from "~/utils/api"; -import "~/styles/globals.css"; +import "~/globals.css"; const MyApp: AppType<{ session: Session | null }> = ({ Component, diff --git a/cli/template/extras/src/pages/_app/with-auth-trpc.tsx b/cli/template/extras/src/pages/_app/with-auth-trpc.tsx index 89d10b0c08..76b330e00d 100644 --- a/cli/template/extras/src/pages/_app/with-auth-trpc.tsx +++ b/cli/template/extras/src/pages/_app/with-auth-trpc.tsx @@ -5,7 +5,7 @@ import { type AppType } from "next/app"; import { api } from "~/utils/api"; -import "~/styles/globals.css"; +import "~/globals.css"; const MyApp: AppType<{ session: Session | null }> = ({ Component, diff --git a/cli/template/extras/src/pages/_app/with-auth-tw.tsx b/cli/template/extras/src/pages/_app/with-auth-tw.tsx index a008ed16b6..d0d847fb1a 100644 --- a/cli/template/extras/src/pages/_app/with-auth-tw.tsx +++ b/cli/template/extras/src/pages/_app/with-auth-tw.tsx @@ -3,7 +3,7 @@ import { type Session } from "next-auth"; import { SessionProvider } from "next-auth/react"; import { type AppType } from "next/app"; -import "~/styles/globals.css"; +import "~/globals.css"; const MyApp: AppType<{ session: Session | null }> = ({ Component, diff --git a/cli/template/extras/src/pages/_app/with-auth.tsx b/cli/template/extras/src/pages/_app/with-auth.tsx index a008ed16b6..d0d847fb1a 100644 --- a/cli/template/extras/src/pages/_app/with-auth.tsx +++ b/cli/template/extras/src/pages/_app/with-auth.tsx @@ -3,7 +3,7 @@ import { type Session } from "next-auth"; import { SessionProvider } from "next-auth/react"; import { type AppType } from "next/app"; -import "~/styles/globals.css"; +import "~/globals.css"; const MyApp: AppType<{ session: Session | null }> = ({ Component, diff --git a/cli/template/extras/src/pages/_app/with-trpc-tw.tsx b/cli/template/extras/src/pages/_app/with-trpc-tw.tsx index 464c50cc4a..a72d4036f2 100644 --- a/cli/template/extras/src/pages/_app/with-trpc-tw.tsx +++ b/cli/template/extras/src/pages/_app/with-trpc-tw.tsx @@ -3,7 +3,7 @@ import { type AppType } from "next/app"; import { api } from "~/utils/api"; -import "~/styles/globals.css"; +import "~/globals.css"; const MyApp: AppType = ({ Component, pageProps }) => { return ( diff --git a/cli/template/extras/src/pages/_app/with-trpc.tsx b/cli/template/extras/src/pages/_app/with-trpc.tsx index 464c50cc4a..a72d4036f2 100644 --- a/cli/template/extras/src/pages/_app/with-trpc.tsx +++ b/cli/template/extras/src/pages/_app/with-trpc.tsx @@ -3,7 +3,7 @@ import { type AppType } from "next/app"; import { api } from "~/utils/api"; -import "~/styles/globals.css"; +import "~/globals.css"; const MyApp: AppType = ({ Component, pageProps }) => { return ( diff --git a/cli/template/extras/src/pages/_app/with-tw.tsx b/cli/template/extras/src/pages/_app/with-tw.tsx index da39269a78..e94171c0b9 100644 --- a/cli/template/extras/src/pages/_app/with-tw.tsx +++ b/cli/template/extras/src/pages/_app/with-tw.tsx @@ -1,7 +1,7 @@ import { GeistSans } from "geist/font/sans"; import { type AppType } from "next/app"; -import "~/styles/globals.css"; +import "~/globals.css"; const MyApp: AppType = ({ Component, pageProps }) => { return ( diff --git a/upgrade/src/app/layout.tsx b/upgrade/src/app/layout.tsx index 824ec93737..a612e8aef5 100644 --- a/upgrade/src/app/layout.tsx +++ b/upgrade/src/app/layout.tsx @@ -1,5 +1,5 @@ import "react-diff-view/style/index.css"; -import "~/styles/globals.css"; +import "~/globals.css"; import { Github } from "lucide-react"; import { type Metadata } from "next"; diff --git a/www/src/components/docs/folderStructureDiagramApp.astro b/www/src/components/docs/folderStructureDiagramApp.astro index 68e9690737..5beb5834de 100644 --- a/www/src/components/docs/folderStructureDiagramApp.astro +++ b/www/src/components/docs/folderStructureDiagramApp.astro @@ -27,7 +27,7 @@ "src/server/api/routers/example.ts": ["trpc"], "src/server/api/trpc.ts": ["trpc"], "src/server/api/root.ts": ["trpc"], - "src/styles/globals.css": [], + "src/globals.css": [], "src/env.js": [], "src/trpc/query-client.ts": ["trpc"], "src/trpc/react.tsx": ["trpc"], diff --git a/www/src/components/docs/folderStructureDiagramPages.astro b/www/src/components/docs/folderStructureDiagramPages.astro index 8756fb6f4c..d45d66bd35 100644 --- a/www/src/components/docs/folderStructureDiagramPages.astro +++ b/www/src/components/docs/folderStructureDiagramPages.astro @@ -27,7 +27,7 @@ "src/server/api/routers/example.ts": ["trpc"], "src/server/api/trpc.ts": ["trpc"], "src/server/api/root.ts": ["trpc"], - "src/styles/globals.css": [], + "src/globals.css": [], "src/utils/api.ts": ["trpc"], ".env": [], ".env.example": [],