Replace relative imports with util import alias

This commit is contained in:
Sat Naing
2022-09-11 14:15:52 +06:30
parent 7017518c2c
commit 8b4cda6b73
7 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
import Datetime from "./Datetime.astro"; import Datetime from "./Datetime.astro";
import type { Frontmatter } from "src/utils/types"; import type { Frontmatter } from "@utils/types";
export interface Props { export interface Props {
href?: string; href?: string;
+1 -1
View File
@@ -1,5 +1,5 @@
--- ---
import formatDatetime from "src/utils/formatDatetime"; import formatDatetime from "@utils/formatDatetime";
export interface Props { export interface Props {
datetime: string; datetime: string;
+1 -1
View File
@@ -1,5 +1,5 @@
--- ---
import slugify from "src/utils/slugify"; import slugify from "@utils/slugify";
export interface Props { export interface Props {
name: string; name: string;
+2 -2
View File
@@ -4,9 +4,9 @@ import Header from "@components/Header.astro";
import Card from "@components/Card.astro"; import Card from "@components/Card.astro";
import Footer from "@components/Footer.astro"; import Footer from "@components/Footer.astro";
import LinkButton from "@components/LinkButton.astro"; import LinkButton from "@components/LinkButton.astro";
import getSortedPosts from "src/utils/getSortedPosts";
import Hr from "@components/Hr.astro"; import Hr from "@components/Hr.astro";
import type { Frontmatter } from "src/utils/types"; import getSortedPosts from "@utils/getSortedPosts";
import type { Frontmatter } from "@utils/types";
const posts = await Astro.glob<Frontmatter>("../contents/*.md"); const posts = await Astro.glob<Frontmatter>("../contents/*.md");
+1 -1
View File
@@ -5,7 +5,7 @@ import Footer from "@components/Footer.astro";
import Datetime from "@components/Datetime.astro"; import Datetime from "@components/Datetime.astro";
import Tag from "@components/Tag.astro"; import Tag from "@components/Tag.astro";
import type { MarkdownInstance } from "astro"; import type { MarkdownInstance } from "astro";
import type { Frontmatter } from "src/utils/types"; import type { Frontmatter } from "@utils/types";
export interface Props { export interface Props {
post: MarkdownInstance<Frontmatter>; post: MarkdownInstance<Frontmatter>;
+2 -2
View File
@@ -4,8 +4,8 @@ import Header from "@components/Header.astro";
import Footer from "@components/Footer.astro"; import Footer from "@components/Footer.astro";
import Main from "@layouts/Main.astro"; import Main from "@layouts/Main.astro";
import Card from "@components/Card.astro"; import Card from "@components/Card.astro";
import getSortedPosts from "src/utils/getSortedPosts"; import getSortedPosts from "@utils/getSortedPosts";
import type { Frontmatter } from "src/utils/types"; import type { Frontmatter } from "@utils/types";
const posts = await Astro.glob<Frontmatter>("../../contents/*.md"); const posts = await Astro.glob<Frontmatter>("../../contents/*.md");
+2 -2
View File
@@ -3,8 +3,8 @@ import Header from "@components/Header.astro";
import Tag from "@components/Tag.astro"; import Tag from "@components/Tag.astro";
import Layout from "@layouts/Layout.astro"; import Layout from "@layouts/Layout.astro";
import Main from "@layouts/Main.astro"; import Main from "@layouts/Main.astro";
import getUniqueTags from "src/utils/getUniqueTags"; import getUniqueTags from "@utils/getUniqueTags";
import type { Frontmatter } from "src/utils/types"; import type { Frontmatter } from "@utils/types";
const posts = await Astro.glob<Frontmatter>("../contents/*.md"); const posts = await Astro.glob<Frontmatter>("../contents/*.md");