mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-05-29 22:37:44 +02:00
chore: better Prettier config for easier reviews
This commit is contained in:
@ -1,20 +1,20 @@
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import fs from 'node:fs'
|
||||
import { fileURLToPath } from "node:url"
|
||||
import fs from "node:fs"
|
||||
|
||||
import { build } from 'vite'
|
||||
import { build } from "vite"
|
||||
|
||||
const curriculumVitae = new URL('./', import.meta.url)
|
||||
const curriculumVitaeDist = new URL('./dist', curriculumVitae)
|
||||
const curriculumVitae = new URL("./", import.meta.url)
|
||||
const curriculumVitaeDist = new URL("./dist", curriculumVitae)
|
||||
const publicCurriculumVitaeOutputURL = new URL(
|
||||
'../public/curriculum-vitae',
|
||||
import.meta.url
|
||||
"../public/curriculum-vitae",
|
||||
import.meta.url,
|
||||
)
|
||||
|
||||
await build({
|
||||
root: fileURLToPath(curriculumVitae),
|
||||
base: '/curriculum-vitae/'
|
||||
base: "/curriculum-vitae/",
|
||||
})
|
||||
|
||||
await fs.promises.cp(curriculumVitaeDist, publicCurriculumVitaeOutputURL, {
|
||||
recursive: true
|
||||
recursive: true,
|
||||
})
|
||||
|
51
curriculum-vitae/package-lock.json
generated
51
curriculum-vitae/package-lock.json
generated
@ -12,9 +12,9 @@
|
||||
"modern-normalize": "2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "20.6.2",
|
||||
"@types/node": "20.8.7",
|
||||
"date-and-time": "3.0.3",
|
||||
"vite": "4.4.9",
|
||||
"vite": "4.5.0",
|
||||
"vite-plugin-html": "3.2.0"
|
||||
}
|
||||
},
|
||||
@ -419,9 +419,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@jridgewell/trace-mapping": {
|
||||
"version": "0.3.19",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz",
|
||||
"integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==",
|
||||
"version": "0.3.20",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
|
||||
"integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/resolve-uri": "^3.1.0",
|
||||
@ -477,10 +477,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz",
|
||||
"integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==",
|
||||
"dev": true
|
||||
"version": "20.8.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz",
|
||||
"integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.25.1"
|
||||
}
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.10.0",
|
||||
@ -1200,9 +1203,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.4.29",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.29.tgz",
|
||||
"integrity": "sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw==",
|
||||
"version": "8.4.31",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
|
||||
"integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@ -1267,9 +1270,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "3.29.2",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.2.tgz",
|
||||
"integrity": "sha512-CJouHoZ27v6siztc21eEQGo0kIcE5D1gVPA571ez0mMYb25LGYGKnVNXpEj5MGlepmDWGXNjDB5q7uNiPHC11A==",
|
||||
"version": "3.29.4",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz",
|
||||
"integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"rollup": "dist/bin/rollup"
|
||||
@ -1346,9 +1349,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/terser": {
|
||||
"version": "5.19.4",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.19.4.tgz",
|
||||
"integrity": "sha512-6p1DjHeuluwxDXcuT9VR8p64klWJKo1ILiy19s6C9+0Bh2+NWTX6nD9EPppiER4ICkHDVB1RkVpin/YW2nQn/g==",
|
||||
"version": "5.22.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.22.0.tgz",
|
||||
"integrity": "sha512-hHZVLgRA2z4NWcN6aS5rQDc+7Dcy58HOf2zbYwmFcQ+ua3h6eEFf5lIDKTzbWwlazPyOZsFQO8V80/IjVNExEw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/source-map": "^0.3.3",
|
||||
@ -1387,6 +1390,12 @@
|
||||
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "5.25.3",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz",
|
||||
"integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
||||
@ -1397,9 +1406,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "4.4.9",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz",
|
||||
"integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==",
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.0.tgz",
|
||||
"integrity": "sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.18.10",
|
||||
|
@ -13,9 +13,9 @@
|
||||
"modern-normalize": "2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "20.6.2",
|
||||
"@types/node": "20.8.7",
|
||||
"date-and-time": "3.0.3",
|
||||
"vite": "4.4.9",
|
||||
"vite": "4.5.0",
|
||||
"vite-plugin-html": "3.2.0"
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { BIRTH_DATE, getAge } from '../../utils/getAge.ts'
|
||||
import { BIRTH_DATE, getAge } from "../../utils/getAge.ts"
|
||||
|
||||
const yearOld = document.getElementById('year-old')
|
||||
const yearOld = document.getElementById("year-old")
|
||||
|
||||
yearOld.textContent = getAge(BIRTH_DATE).toString()
|
||||
|
@ -1,7 +1,7 @@
|
||||
@import 'modern-normalize/modern-normalize.css';
|
||||
@import "modern-normalize/modern-normalize.css";
|
||||
|
||||
body {
|
||||
font-family: 'Montserrat', 'Arial', 'sans-serif';
|
||||
font-family: "Montserrat", "Arial", "sans-serif";
|
||||
background: #f0f0f0;
|
||||
color: #333;
|
||||
line-height: 1.42857143;
|
||||
|
@ -1,19 +1,19 @@
|
||||
import fs from 'node:fs'
|
||||
import fs from "node:fs"
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import { parse as JSONCParser } from 'jsonc-parser'
|
||||
import { createHtmlPlugin } from 'vite-plugin-html'
|
||||
import date from 'date-and-time'
|
||||
import { defineConfig } from "vite"
|
||||
import { parse as JSONCParser } from "jsonc-parser"
|
||||
import { createHtmlPlugin } from "vite-plugin-html"
|
||||
import date from "date-and-time"
|
||||
|
||||
const jsonCurriculumVitaeURL = new URL(
|
||||
'./curriculum-vitae.jsonc',
|
||||
import.meta.url
|
||||
"./curriculum-vitae.jsonc",
|
||||
import.meta.url,
|
||||
)
|
||||
const dataCurriculumVitaeStringJSON = await fs.promises.readFile(
|
||||
jsonCurriculumVitaeURL,
|
||||
{
|
||||
encoding: 'utf-8'
|
||||
}
|
||||
encoding: "utf-8",
|
||||
},
|
||||
)
|
||||
const curriculumVitae = JSONCParser(dataCurriculumVitaeStringJSON)
|
||||
|
||||
@ -22,7 +22,7 @@ const curriculumVitae = JSONCParser(dataCurriculumVitaeStringJSON)
|
||||
*/
|
||||
export default defineConfig({
|
||||
build: {
|
||||
assetsDir: './'
|
||||
assetsDir: "./",
|
||||
},
|
||||
plugins: [
|
||||
createHtmlPlugin({
|
||||
@ -30,13 +30,13 @@ export default defineConfig({
|
||||
data: {
|
||||
date,
|
||||
locals: {
|
||||
...curriculumVitae
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
...curriculumVitae,
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
css: {
|
||||
postcss: {}
|
||||
}
|
||||
postcss: {},
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user