From fab7b6718e8de4d32d1fee15a4f755bf4917ee9b Mon Sep 17 00:00:00 2001 From: Ivan Dimitrov Date: Sun, 19 Nov 2023 08:18:30 +0200 Subject: [PATCH] move utils out of app --- new.ts | 2 +- src/app/layout.tsx | 2 +- src/{app => }/components/copy-button.tsx | 0 src/{app => }/components/navbar.tsx | 0 src/{app => }/lib/content.ts | 0 src/{app => }/lib/react.ts | 0 tsconfig.json | 4 ++-- 7 files changed, 4 insertions(+), 4 deletions(-) rename src/{app => }/components/copy-button.tsx (100%) rename src/{app => }/components/navbar.tsx (100%) rename src/{app => }/lib/content.ts (100%) rename src/{app => }/lib/react.ts (100%) diff --git a/new.ts b/new.ts index 8bb3c06..e2e7526 100644 --- a/new.ts +++ b/new.ts @@ -1,4 +1,4 @@ -import { baseDir, getAllContent } from "@/app/lib/content"; +import { baseDir, getAllContent } from "$lib/content"; import fs from "fs" const args = process.argv.slice(2) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 9a7aed6..e19b22b 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,5 +1,5 @@ import './globals.css' -import Navbar from './components/navbar' +import Navbar from '$components/navbar' import type { Metadata } from 'next' export const metadata: Metadata = { diff --git a/src/app/components/copy-button.tsx b/src/components/copy-button.tsx similarity index 100% rename from src/app/components/copy-button.tsx rename to src/components/copy-button.tsx diff --git a/src/app/components/navbar.tsx b/src/components/navbar.tsx similarity index 100% rename from src/app/components/navbar.tsx rename to src/components/navbar.tsx diff --git a/src/app/lib/content.ts b/src/lib/content.ts similarity index 100% rename from src/app/lib/content.ts rename to src/lib/content.ts diff --git a/src/app/lib/react.ts b/src/lib/react.ts similarity index 100% rename from src/app/lib/react.ts rename to src/lib/react.ts diff --git a/tsconfig.json b/tsconfig.json index f6c67e1..7e86bcd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,8 +20,8 @@ ], "paths": { "@/*": ["./src/*"], - "$components/*": ["./src/app/components/*"], - "$lib/*": ["./src/app/lib/*"] + "$components/*": ["./src/components/*"], + "$lib/*": ["./src/lib/*"] } }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],