Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

절대 경로 설정 #99

Merged
merged 6 commits into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Image from "next/image";

import { getSortedPostsAndProjectsData } from "../common/utils/posts";
import { getSortedPostsAndProjectsData } from "@/common/utils/posts";

import NotFoundHeader from "../components/NotFound/Header";
import RecentPosts from "../components/Home/RecentPosts";
import NotFoundHeader from "@/components/NotFound/Header";
import RecentPosts from "@/components/Home/RecentPosts";

import styles from "../styles/NotFound.module.css";
import styles from "@/styles/NotFound.module.css";

const POSTING_VIEW_COUNT = 3;

Expand Down
6 changes: 3 additions & 3 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Introduce from "../components/Home/Introduce";
import PostList from "../common/components/PostList";
import Introduce from "@/components/Home/Introduce";
import PostList from "@/common/components/PostList";

import { getSortedPostsAndProjectsData } from "../common/utils/posts";
import { getSortedPostsAndProjectsData } from "@/common/utils/posts";

import type { Metadata } from "next";

Expand Down
10 changes: 5 additions & 5 deletions app/post/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import Image from "next/image";

import { getAllPostIds, getPostData } from "../../../common/utils/posts";
import { getAllPostIds, getPostData } from "@/common/utils/posts";

import MDXRemote from "../../../common/components/MDXRemote";
import TopScrollButton from "../../../common/components/TopScrollButton";
import TableOfContents from "../../../common/components/TableOfContents";
import MDXRemote from "@/common/components/MDXRemote";
import TopScrollButton from "@/common/components/TopScrollButton";
import TableOfContents from "@/common/components/TableOfContents";

import styles from "./post.module.css";

import type { Metadata } from "next";
import type { Params } from "../../../common/types/params";
import type { Params } from "@/common/types/params";

const getPost = async (params: Params) => {
const postData = await getPostData({ postType: "posts", id: params.id });
Expand Down
4 changes: 2 additions & 2 deletions app/posts/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PostList from "../../common/components/PostList";
import PostList from "@/common/components/PostList";

import { getSortedPostsData } from "../../common/utils/posts";
import { getSortedPostsData } from "@/common/utils/posts";

import type { Metadata } from "next";

Expand Down
10 changes: 5 additions & 5 deletions app/project/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import Image from "next/image";

import { getAllPostIds, getPostData } from "../../../common/utils/posts";
import { getAllPostIds, getPostData } from "@/common/utils/posts";

import MDXRemote from "../../../common/components/MDXRemote";
import TopScrollButton from "../../../common/components/TopScrollButton";
import TableOfContents from "../../../common/components/TableOfContents";
import MDXRemote from "@/common/components/MDXRemote";
import TopScrollButton from "@/common/components/TopScrollButton";
import TableOfContents from "@/common/components/TableOfContents";

import styles from "./project.module.css";

import type { Metadata } from "next";
import type { Params } from "../../../common/types/params";
import type { Params } from "@/common/types/params";

const getProject = async (params: Params) => {
const postData = await getPostData({ postType: "projects", id: params.id });
Expand Down
4 changes: 2 additions & 2 deletions app/projects/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Head from "next/head";

import PostList from "../../common/components/PostList";
import PostList from "@/common/components/PostList";

import { getSortedPostsData } from "../../common/utils/posts";
import { getSortedPostsData } from "@/common/utils/posts";

import type { Metadata } from "next";

Expand Down
2 changes: 1 addition & 1 deletion common/components/PostList/PostItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Tag from "./Tag";
import styles from "./PostItem.module.css";

import type { NextPage } from "next";
import type { PostData } from "../../../utils/posts";
import type { PostData } from "@/common/utils/posts";

interface PostItemProps {
href: string;
Expand Down
2 changes: 1 addition & 1 deletion common/components/PostList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PostItem from "./PostItem";
import styles from "./PostList.module.css";

import type { NextPage } from "next";
import type { PostData } from "../../utils/posts";
import type { PostData } from "@/common/utils/posts";

interface PostListProps {
postList: PostData[];
Expand Down
2 changes: 1 addition & 1 deletion common/components/TableOfContents/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { MouseEvent, CSSProperties } from "react";
import type {
TableOfContent as TableOfContentType,
TableOfContents as TableOfContentsType,
} from "../../utils/posts";
} from "@/common/utils/posts";

import styles from "./TableOfContents.module.css";

Expand Down
4 changes: 2 additions & 2 deletions components/Home/RecentPosts/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import PostList from "../../../common/components/PostList";
import PostList from "@/common/components/PostList";

import styles from "./RecentPost.module.css";

import type { NextPage } from "next";
import type { PostData } from "../../../common/utils/posts";
import type { PostData } from "@/common/utils/posts";

interface RecentPostsProps {
postList: PostData[];
Expand Down
2 changes: 1 addition & 1 deletion components/Layout/Container/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Navigation from "../Navigation";
import Footer from "../Footer";
import ThemeButton from "../ThemeButton";

import "../../../styles/globals.css";
import "@/styles/globals.css";
import styles from "./Container.module.css";

interface ContainerProps {
Expand Down
2 changes: 1 addition & 1 deletion components/Layout/Navigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Link from "next/link";
import { usePathname } from "next/navigation";

import navLinks from "../../../common/routes";
import navLinks from "@/common/routes";
import ProfileButton from "../ProfileButton";

import styles from "./Navigation.module.css";
Expand Down
18 changes: 9 additions & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -22,7 +18,13 @@
{
"name": "next"
}
]
],
"baseUrl": ".",
"paths": {
"@/components/*": ["components/*"],
"@/common/*": ["common/*"],
"@/styles/*": ["styles/*"]
}
},
"include": [
"next-env.d.ts",
Expand All @@ -31,7 +33,5 @@
"lib/posts.ts",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
"exclude": ["node_modules"]
}