generated from Fascinated/nextjs-13-template-with-tailwindcss
fix config loading
All checks were successful
Publish Docker Image / docker (push) Successful in 2m2s
All checks were successful
Publish Docker Image / docker (push) Successful in 2m2s
This commit is contained in:
parent
5336a89dcc
commit
6ad1b6b85d
26
package-lock.json
generated
26
package-lock.json
generated
@ -2828,6 +2828,19 @@
|
|||||||
"js-yaml": "bin/js-yaml.js"
|
"js-yaml": "bin/js-yaml.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/js-yaml-loader/node_modules/loader-utils": {
|
||||||
|
"version": "1.4.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
|
||||||
|
"integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
|
||||||
|
"dependencies": {
|
||||||
|
"big.js": "^5.2.2",
|
||||||
|
"emojis-list": "^3.0.0",
|
||||||
|
"json5": "^1.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/json-schema-traverse": {
|
"node_modules/json-schema-traverse": {
|
||||||
"version": "0.4.1",
|
"version": "0.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
||||||
@ -2901,19 +2914,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
||||||
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
|
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
|
||||||
},
|
},
|
||||||
"node_modules/loader-utils": {
|
|
||||||
"version": "1.4.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
|
|
||||||
"integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
|
|
||||||
"dependencies": {
|
|
||||||
"big.js": "^5.2.2",
|
|
||||||
"emojis-list": "^3.0.0",
|
|
||||||
"json5": "^1.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=4.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/locate-path": {
|
"node_modules/locate-path": {
|
||||||
"version": "6.0.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
import { Config } from "@/src/types/config";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { Fragment } from "react";
|
import { Fragment } from "react";
|
||||||
import { useLanyardWS } from "use-lanyard";
|
import { useLanyardWS } from "use-lanyard";
|
||||||
|
|
||||||
import Config from "../../../config.yml";
|
const Config: Config = require("../../../config.yml") as any;
|
||||||
|
|
||||||
function LanyardWrapper(props: { children: any }) {
|
function LanyardWrapper(props: { children: any }) {
|
||||||
return <Fragment>{props.children}</Fragment>;
|
return <Fragment>{props.children}</Fragment>;
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
|
import { Config } from "@/src/types/config";
|
||||||
import { config } from "@fortawesome/fontawesome-svg-core";
|
import { config } from "@fortawesome/fontawesome-svg-core";
|
||||||
import "@fortawesome/fontawesome-svg-core/styles.css";
|
import "@fortawesome/fontawesome-svg-core/styles.css";
|
||||||
import { Inter } from "next/font/google";
|
import { Inter } from "next/font/google";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
|
|
||||||
import Config from "../../config.yml";
|
const Config: Config = require("../../config.yml") as any;
|
||||||
config.autoAddCss = false;
|
config.autoAddCss = false;
|
||||||
|
|
||||||
const inter = Inter({ subsets: ["latin"] });
|
const inter = Inter({ subsets: ["latin"] });
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
|
import { Config } from "@/src/types/config";
|
||||||
import { library } from "@fortawesome/fontawesome-svg-core";
|
import { library } from "@fortawesome/fontawesome-svg-core";
|
||||||
import { fab } from "@fortawesome/free-brands-svg-icons";
|
import { fab } from "@fortawesome/free-brands-svg-icons";
|
||||||
import { far } from "@fortawesome/free-regular-svg-icons";
|
import { far } from "@fortawesome/free-regular-svg-icons";
|
||||||
import { fas } from "@fortawesome/free-solid-svg-icons";
|
import { fas } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import Config from "../../config.yml";
|
|
||||||
import Avatar from "./components/Avatar";
|
import Avatar from "./components/Avatar";
|
||||||
|
|
||||||
|
const Config: Config = require("../../config.yml") as any;
|
||||||
|
|
||||||
library.add(fab, far, fas); // Loading in the icons from FontAwesome
|
library.add(fab, far, fas); // Loading in the icons from FontAwesome
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
|
4
src/types/config.d.ts
vendored
4
src/types/config.d.ts
vendored
@ -1,5 +1,3 @@
|
|||||||
import { YAMLMap } from "js-yaml";
|
|
||||||
|
|
||||||
export interface Config {
|
export interface Config {
|
||||||
configVersion: string;
|
configVersion: string;
|
||||||
name: string;
|
name: string;
|
||||||
@ -52,6 +50,6 @@ export interface Config {
|
|||||||
|
|
||||||
// Parse the YAML content and convert it to the defined type
|
// Parse the YAML content and convert it to the defined type
|
||||||
declare module "*.yml" {
|
declare module "*.yml" {
|
||||||
const content: YAMLMap & Config;
|
const content: any;
|
||||||
export default content;
|
export default content;
|
||||||
}
|
}
|
||||||
|
@ -21,11 +21,13 @@
|
|||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./*"]
|
"@/*": ["./*"]
|
||||||
}
|
},
|
||||||
|
"typeRoots": ["./src/types", "./node_modules/@types"],
|
||||||
|
"types": ["node"]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"next-env.d.ts",
|
"next-env.d.ts",
|
||||||
"src/types/*.d.ts",
|
"src/types/**/*.d.ts",
|
||||||
"**/*.ts",
|
"**/*.ts",
|
||||||
"**/*.tsx",
|
"**/*.tsx",
|
||||||
".next/types/**/*.ts"
|
".next/types/**/*.ts"
|
||||||
|
Loading…
Reference in New Issue
Block a user