2023-10-23 23:11:59 +02:00
|
|
|
import { fileURLToPath } from "node:url"
|
|
|
|
import fs from "node:fs"
|
2023-07-28 11:53:04 +02:00
|
|
|
|
2023-10-23 23:11:59 +02:00
|
|
|
import { build } from "vite"
|
2023-07-28 11:53:04 +02:00
|
|
|
|
2023-10-23 23:11:59 +02:00
|
|
|
const curriculumVitae = new URL("./", import.meta.url)
|
|
|
|
const curriculumVitaeDist = new URL("./dist", curriculumVitae)
|
2023-07-28 11:53:04 +02:00
|
|
|
const publicCurriculumVitaeOutputURL = new URL(
|
2023-10-23 23:11:59 +02:00
|
|
|
"../public/curriculum-vitae",
|
|
|
|
import.meta.url,
|
2023-07-28 11:53:04 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
await build({
|
|
|
|
root: fileURLToPath(curriculumVitae),
|
2023-10-23 23:11:59 +02:00
|
|
|
base: "/curriculum-vitae/",
|
2023-07-28 11:53:04 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
await fs.promises.cp(curriculumVitaeDist, publicCurriculumVitaeOutputURL, {
|
2023-10-23 23:11:59 +02:00
|
|
|
recursive: true,
|
2023-07-28 11:53:04 +02:00
|
|
|
})
|