Update tsconfig and import paths for project-wide consistency

Modified tsconfig.json to add compilerOptions for @/* base directory paths and updated all relative file import paths in the project to use this configuration. This change provides a cleaner, more consistent, and efficient way to handle file imports.
This commit is contained in:
Emil Gulamov 2024-03-25 22:39:36 +04:00
parent 2e8ebc817c
commit 5a7150cc05
27 changed files with 100 additions and 93 deletions

View file

@ -2,7 +2,7 @@
// Import the necessary dependencies
import FooterSocialLink from "../ui/links/FooterSocialLink.astro";
import EmailFooterInput from "../ui/forms/input/EmailFooterInput.astro";
import { footerLinks, socialLinks } from "../../utils/navigation.ts";
import { footerLinks, socialLinks } from "@/utils/navigation.ts";
import Icon from "../ui/icons/Icon.astro";
// Define the variables that will be used in this component

View file

@ -3,7 +3,7 @@
import ThemeIcon from "../ThemeIcon.astro";
import NavLink from "../ui/links/NavLink.astro";
import Authentication from "./Authentication.astro";
import { navBarLinks } from "../../utils/navigation.ts";
import { navBarLinks } from "@/utils/navigation.ts";
---
<!-- Main header component -->

View file

@ -1,6 +1,6 @@
---
import { Image } from "astro:assets";
import product5 from "../../../images/features-image.avif";
import product5 from "@/images/features-image.avif";
// Define props from Astro
const { title, subTitle, benefits } = Astro.props;

View file

@ -2,7 +2,7 @@
// Import necessary components and utilities
import AvatarBlog from "../avatars/AvatarBlog.astro";
import { Image } from "astro:assets";
import { formatDate } from "../../../utils/utils";
import { formatDate } from "@/utils/utils";
import type { CollectionEntry } from "astro:content";
const { blogEntry } = Astro.props;

View file

@ -1,7 +1,7 @@
---
// Import necessary modules and utilities
import { Image } from "astro:assets";
import { formatDate } from "../../../utils/utils";
import { formatDate } from "@/utils/utils";
import type { CollectionEntry } from "astro:content";
const { blogEntry } = Astro.props;

View file

@ -1,6 +1,6 @@
---
import logo from "../../../images/starlight/screwfast_logo_dark.svg?raw";
import docs from "../../../images/starlight/docs_logo.svg?raw";
import logo from "@/images/starlight/screwfast_logo_dark.svg?raw";
import docs from "@/images/starlight/docs_logo.svg?raw";
import type { Props } from "@astrojs/starlight/props";
const main = "/";

View file

@ -2,10 +2,10 @@
title: "Maximizing Efficiency with ScrewFast's Cutting-Edge Tools"
description: "Innovating Construction Efficiency with Precision Tools & Support"
author: "Jacob"
authorImage: "../../images/blog/jacob.avif"
authorImage: "@/images/blog/jacob.avif"
authorImageAlt: "Avatar Description"
pubDate: 2024-02-06
cardImage: "../../images/blog/post-1.avif"
cardImage: "@/images/blog/post-1.avif"
cardImageAlt: "Top view mechanical tools arrangement"
readTime: 4
tags: ["tools", "construction", "workflow" ]

View file

@ -2,10 +2,10 @@
title: "Enhancing Safety and Workmanship with ScrewFast Construction Services"
description: "Quality construction services for lasting results"
author: "Brad"
authorImage: "../../images/blog/brad.avif"
authorImage: "@/images/blog/brad.avif"
authorImageAlt: "Avatar Description"
pubDate: 2024-02-10
cardImage: "../../images/blog/post-2.avif"
cardImage: "@/images/blog/post-2.avif"
cardImageAlt: "Man in black sweatpants using DEWALT circular saw and cutting a wood plank"
readTime: 5
tags: ["safety", "craftsmanship", "management" ]

View file

@ -3,10 +3,10 @@ title: "Simplify Procurement and Stay Within Budget with ScrewFast"
description: "Affordable, durable tools for efficient construction projects"
author: "Olga Zabegina"
role: "Strategic Marketing Manager"
authorImage: "../../images/blog/anna.avif"
authorImage: "@/images/blog/anna.avif"
authorImageAlt: "Avatar Description"
pubDate: 2024-02-18
cardImage: "../../images/blog/post-3.avif"
cardImage: "@/images/blog/post-3.avif"
cardImageAlt: "Side view worker wearing gloves"
readTime: 3
tags: ["procurement", "affordable", "efficiency" ]

View file

@ -1,7 +1,7 @@
---
title: "The Future of Construction Technology"
description: "Explore ScrewFast's pioneering role in revolutionizing construction through advanced technology and innovative solutions."
cardImage: "../../images/insights/insight-1.avif"
cardImage: "@/images/insights/insight-1.avif"
cardImageAlt: "Top view mechanical tools arrangement"
contents: [
"As technology continues to evolve, so too does the construction industry. From advanced robotics to augmented reality, the possibilities for innovation are endless. At ScrewFast, we're at the forefront of this technological revolution, developing cutting-edge tools and solutions to drive the industry forward.",

View file

@ -1,7 +1,7 @@
---
title: "The Importance of Collaboration"
description: "Explore how collaboration is central to ScrewFast's construction approach, driving effective communication and teamwork to achieve outstanding outcomes."
cardImage: "../../images/insights/insight-2.avif"
cardImage: "@/images/insights/insight-2.avif"
cardImageAlt: "Top view mechanical tools arrangement"
contents: [
"Construction projects are complex undertakings that require collaboration and coordination among various stakeholders. From architects and engineers to contractors and suppliers, effective collaboration is essential for success.",

View file

@ -1,7 +1,7 @@
---
title: "The Impact of Sustainable Practices"
description: "Discover how ScrewFast is leading the charge in promoting sustainability within the construction industry"
cardImage: "../../images/insights/insight-3.avif"
cardImage: "@/images/insights/insight-3.avif"
cardImageAlt: "Top view mechanical tools arrangement"
contents: [
"With growing concerns about climate change and environmental sustainability, the construction industry is facing increasing pressure to adopt more eco-friendly practices. At ScrewFast, we're committed to doing our part to minimize our environmental footprint and promote sustainability in everything we do.",

View file

@ -5,8 +5,8 @@ main:
subTitle: "Assorted Screw Set"
content: |
Introducing the SF-AB A765 Assorted Screw Set the ultimate solution for your screw fastening needs. This comprehensive set includes a wide variety of screws meticulously curated to tackle various projects with ease and precision.
imgCard: "../../images/product-image-2.avif"
imgMain: "../../images/product-image-main-2.avif"
imgCard: "@/images/product-image-2.avif"
imgMain: "@/images/product-image-main-2.avif"
imgAlt: "Mockup boxes of assorted screw set"
tabs:
- id: "tabs-with-card-item-1"
@ -50,7 +50,7 @@ specificationsRight:
- title: "Applications"
subTitle: "Suitable for a wide range of applications, including woodworking, metalworking, construction, and more."
blueprints:
first: "../../images/blueprint-1.avif"
second: "../../images/blueprint-2.avif"
first: "@/images/blueprint-1.avif"
second: "@/images/blueprint-2.avif"
slug: a765
---

View file

@ -5,8 +5,8 @@ main:
subTitle: "Tap Bolts and Nuts Set"
content: |
Meet the SF-BN B203 your reliable companion for professional-grade fastening. This comprehensive box set comes with a versatile selection of tap bolts and nuts, meticulously crafted to provide the strongest hold for your construction and assembly projects.
imgCard: "../../images/product-image-3.avif"
imgMain: "../../images/product-image-main-3.avif"
imgCard: "@/images/product-image-3.avif"
imgMain: "@/images/product-image-main-3.avif"
imgAlt: "Mockup boxes of a tap bolts and nuts set"
tabs:
- id: "tabs-with-card-item-1"
@ -50,7 +50,7 @@ specificationsRight:
- title: "Suitable Applications"
subTitle: "Ideal for a wide array of uses, from construction environments to mechanical assemblies that demand strong and secure joints."
blueprints:
first: "../../images/blueprint-1.avif"
second: "../../images/blueprint-2.avif"
first: "@/images/blueprint-1.avif"
second: "@/images/blueprint-2.avif"
slug: b203
---

View file

@ -5,8 +5,8 @@ main:
subTitle: "Hex Bolts"
content: |
Introducing the SF-FN F303 Hex Bolts the perfect choice for heavy-duty fastening applications. Crafted with precision and durability in mind, these hex bolts provide the strength and reliability you need for your toughest projects.
imgCard: "../../images/product-image-4.avif"
imgMain: "../../images/product-image-main-4.avif"
imgCard: "@/images/product-image-4.avif"
imgMain: "@/images/product-image-main-4.avif"
imgAlt: "Mockup boxes of hex bolts"
tabs:
- id: "tabs-with-card-item-1"
@ -50,7 +50,7 @@ specificationsRight:
- title: "Applications"
subTitle: "Ideal for use in construction, machinery, automotive, and other heavy-duty applications that demand strong and reliable fastening."
blueprints:
first: "../../images/blueprint-1.avif"
second: "../../images/blueprint-2.avif"
first: "@/images/blueprint-1.avif"
second: "@/images/blueprint-2.avif"
slug: f303
---

View file

@ -5,8 +5,8 @@ main:
subTitle: "Machine Screws"
content: |
Introducing the SF-TB T845 your go-to solution for precision fastening in machinery and equipment. This comprehensive set of machine screws is meticulously crafted to meet the stringent demands of industrial applications, ensuring secure and reliable fastening.
imgCard: "../../images/product-image-1.avif"
imgMain: "../../images/product-image-main-1.avif"
imgCard: "@/images/product-image-1.avif"
imgMain: "@/images/product-image-main-1.avif"
imgAlt: "Mockup boxes of machine screws set"
tabs:
- id: "tabs-with-card-item-1"
@ -50,7 +50,7 @@ specificationsRight:
- title: "Applications"
subTitle: "Ideal for use in a wide range of industrial machinery, equipment, and assemblies that demand precise and secure fastening."
blueprints:
first: "../../images/blueprint-1.avif"
second: "../../images/blueprint-2.avif"
first: "@/images/blueprint-1.avif"
second: "@/images/blueprint-2.avif"
slug: t845
---

View file

@ -1,17 +1,18 @@
---
// Importing necessary components
import Meta from "../components/Meta.astro";
import Navbar from "../components/sections/Navbar.astro";
import FooterSection from "../components/sections/FooterSection.astro";
import Meta from "@/components/Meta.astro";
import Navbar from "@/components/sections/Navbar.astro";
import FooterSection from "@/components/sections/FooterSection.astro";
// Setting expected props
const { title = "ScrewFast", meta, structuredData } = Astro.props;
const { title = "ScrewFast", meta, structuredData, lang = "en" } = Astro.props;
// Interface to type-check the properties
interface Props {
title?: string;
meta?: string;
structuredData?: object;
lang?: string;
}
---
@ -19,7 +20,7 @@ interface Props {
This is the main structure for the page.
We set the language of the page to English and add classes for scrollbar and scroll behavior.
-->
<html lang="en" class="scrollbar-hide scroll-pt-16">
<html lang={lang} class="scrollbar-hide scroll-pt-16 lenis lenis-smooth">
<head>
<!-- Adding metadata to the HTML document -->
<Meta meta={meta} structuredData={structuredData} />

View file

@ -1,7 +1,7 @@
---
// Import section components
import MainLayout from "../layouts/MainLayout.astro";
import Btn404 from "../components/ui/buttons/Btn404.astro";
import MainLayout from "@/layouts/MainLayout.astro";
import Btn404 from "@/components/ui/buttons/Btn404.astro";
// Define variables for page content
const title: string = "404";

View file

@ -1,13 +1,13 @@
---
// Import necessary components and utilities
import MainLayout from "../../layouts/MainLayout.astro";
import AvatarBlogLarge from "../../components/ui/avatars/AvatarBlogLarge.astro";
import CardRelated from "../../components/ui/cards/CardRelated.astro";
import Bookmark from "../../components/ui/buttons/Bookmark.astro";
import SocialShare from "../../components/ui/buttons/SocialShare.astro";
import PostFeedback from "../../components/ui/feedback/PostFeedback.astro";
import MainLayout from "@/layouts/MainLayout.astro";
import AvatarBlogLarge from "@/components/ui/avatars/AvatarBlogLarge.astro";
import CardRelated from "@/components/ui/cards/CardRelated.astro";
import Bookmark from "@/components/ui/buttons/Bookmark.astro";
import SocialShare from "@/components/ui/buttons/SocialShare.astro";
import PostFeedback from "@/components/ui/feedback/PostFeedback.astro";
import { Image } from "astro:assets";
import { capitalize, formatDate } from "../../utils/utils";
import { capitalize, formatDate } from "@/utils/utils";
import { getCollection } from "astro:content";
import type { CollectionEntry } from "astro:content";

View file

@ -1,9 +1,9 @@
---
// Import necessary components, modules and types
import MainLayout from "../../layouts/MainLayout.astro";
import CardBlog from "../../components/ui/cards/CardBlog.astro";
import CardBlogRecent from "../../components/ui/cards/CardBlogRecent.astro";
import CardInsight from "../../components/ui/cards/CardInsight.astro";
import MainLayout from "@/layouts/MainLayout.astro";
import CardBlog from "@/components/ui/cards/CardBlog.astro";
import CardBlogRecent from "@/components/ui/cards/CardBlogRecent.astro";
import CardInsight from "@/components/ui/cards/CardInsight.astro";
import { getCollection } from "astro:content";
import type { CollectionEntry } from "astro:content";

View file

@ -1,7 +1,7 @@
---
// Import the necessary components
import MainLayout from "../layouts/MainLayout.astro";
import ContactSection from "../components/sections/ContactSection.astro";
import MainLayout from "@/layouts/MainLayout.astro";
import ContactSection from "@/components/sections/ContactSection.astro";
---
<!--Utilizing MainLayout for the outer layout of the page, and defining meta for SEO purposes-->

View file

@ -1,22 +1,22 @@
---
// Import the necessary components
import MainLayout from "../layouts/MainLayout.astro";
import HeroSection from "../components/sections/landing/HeroSection.astro";
import HeroSectionAlt from "../components/sections/landing/HeroSectionAlt.astro";
import ClientsSection from "../components/sections/landing/ClientsSection.astro";
import FeaturesGeneral from "../components/sections/features/FeaturesGeneral.astro";
import FeaturesNavs from "../components/sections/features/FeaturesNavs.astro";
import TestimonialsSection from "../components/sections/testimonials/TestimonialsSection.astro";
import PricingSection from "../components/sections/pricing/PricingSection.astro";
import FAQ from "../components/sections/FAQ.astro";
import AnnouncementBanner from "../components/ui/banners/AnnouncementBanner.astro";
import heroImage from "../images/hero-image.avif";
import faqs from "../data_files/faqs.json";
import features from "../data_files/features.json";
import featureImage from "../images/features-image.avif";
import construction from "../images/construction-image.avif";
import tools from "../images/automated-tools.avif";
import dashboard from "../images/dashboard-image.avif";
import MainLayout from "@/layouts/MainLayout.astro";
import HeroSection from "@/components/sections/landing/HeroSection.astro";
import HeroSectionAlt from "@/components/sections/landing/HeroSectionAlt.astro";
import ClientsSection from "@/components/sections/landing/ClientsSection.astro";
import FeaturesGeneral from "@/components/sections/features/FeaturesGeneral.astro";
import FeaturesNavs from "@/components/sections/features/FeaturesNavs.astro";
import TestimonialsSection from "@/components/sections/testimonials/TestimonialsSection.astro";
import PricingSection from "@/components/sections/pricing/PricingSection.astro";
import FAQ from "@/components/sections/FAQ.astro";
import AnnouncementBanner from "@/components/ui/banners/AnnouncementBanner.astro";
import heroImage from "@/images/hero-image.avif";
import faqs from "@/data_files/faqs.json";
import features from "@/data_files/features.json";
import featureImage from "@/images/features-image.avif";
import construction from "@/images/construction-image.avif";
import tools from "@/images/automated-tools.avif";
import dashboard from "@/images/dashboard-image.avif";
const avatarSrcs: Array<string> = [
"https://images.unsplash.com/photo-1568602471122-7832951cc4c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2&w=300&h=300&q=80",

View file

@ -1,6 +1,6 @@
---
// Import section components
import MainLayout from "../../layouts/MainLayout.astro";
import MainLayout from "@/layouts/MainLayout.astro";
import { Image } from "astro:assets";
import { getCollection } from "astro:content";

View file

@ -1,8 +1,8 @@
---
// Import section components
import MainLayout from "../../layouts/MainLayout.astro";
import ProductTabBtn from "../../components/ui/buttons/ProductTabBtn.astro";
import PrimaryCTA from "../../components/ui/buttons/PrimaryCTA.astro";
import MainLayout from "@/layouts/MainLayout.astro";
import ProductTabBtn from "@/components/ui/buttons/ProductTabBtn.astro";
import PrimaryCTA from "@/components/ui/buttons/PrimaryCTA.astro";
import { Image } from "astro:assets";
import { getCollection } from "astro:content";

View file

@ -1,11 +1,11 @@
---
// Importing necessary components
import MainLayout from "../../layouts/MainLayout.astro";
import PrimaryCTA from "../../components/ui/buttons/PrimaryCTA.astro";
import CardSmall from "../../components/ui/cards/CardSmall.astro";
import CardWide from "../../components/ui/cards/CardWide.astro";
import FeaturesStatsAlt from "../../components/sections/features/FeaturesStatsAlt.astro";
import TestimonialsSectionAlt from "../../components/sections/testimonials/TestimonialsSectionAlt.astro";
import MainLayout from "@/layouts/MainLayout.astro";
import PrimaryCTA from "@/components/ui/buttons/PrimaryCTA.astro";
import CardSmall from "@/components/ui/cards/CardSmall.astro";
import CardWide from "@/components/ui/cards/CardWide.astro";
import FeaturesStatsAlt from "@/components/sections/features/FeaturesStatsAlt.astro";
import TestimonialsSectionAlt from "@/components/sections/testimonials/TestimonialsSectionAlt.astro";
// Importing necessary functions from Astro
import { getCollection } from "astro:content";

View file

@ -1,20 +1,20 @@
---
// Import necessary components
import MainLayout from "../layouts/MainLayout.astro";
import MainSection from "../components/ui/blocks/MainSection.astro";
import LeftSection from "../components/ui/blocks/LeftSection.astro";
import RightSection from "../components/ui/blocks/RightSection.astro";
import FeaturesStats from "../components/sections/features/FeaturesStats.astro";
import MainLayout from "@/layouts/MainLayout.astro";
import MainSection from "@/components/ui/blocks/MainSection.astro";
import LeftSection from "@/components/ui/blocks/LeftSection.astro";
import RightSection from "@/components/ui/blocks/RightSection.astro";
import FeaturesStats from "@/components/sections/features/FeaturesStats.astro";
// Import necessary images
import blueprints from "../images/blueprints-image.avif";
import personWorking from "../images/person-working.avif";
import beforeAfter from "../images/before-after.avif";
import constructionWorkers from "../images/construction-workers.avif";
import aerialView from "../images/aerial-view.avif";
import usingTools from "../images/using-tools.avif";
import progressBuilding from "../images/progress-building.avif";
import underConstruction from "../images/under-construction.avif";
import blueprints from "@/images/blueprints-image.avif";
import personWorking from "@/images/person-working.avif";
import beforeAfter from "@/images/before-after.avif";
import constructionWorkers from "@/images/construction-workers.avif";
import aerialView from "@/images/aerial-view.avif";
import usingTools from "@/images/using-tools.avif";
import progressBuilding from "@/images/progress-building.avif";
import underConstruction from "@/images/under-construction.avif";
interface Article {
isRightSection: boolean;

View file

@ -1,3 +1,9 @@
{
"extends": "astro/tsconfigs/strict"
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
},
}
}