1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-05 04:51:30 +01:00
.profile/jsonresume-theme-custom/build.js

21 lines
512 B
JavaScript
Raw Normal View History

import { fileURLToPath } from 'node:url'
2022-07-01 23:12:47 +02:00
import fs from 'node:fs'
import { build } from 'vite'
2022-11-29 10:29:02 +01:00
const jsonResumeThemeCustom = new URL('./', import.meta.url)
const jsonResumeThemeCustomDist = new URL('./dist', jsonResumeThemeCustom)
const publicResumeOutputURL = new URL(
2022-11-29 10:29:02 +01:00
'../public/curriculum-vitae',
import.meta.url
)
await build({
root: fileURLToPath(jsonResumeThemeCustom),
base: '/curriculum-vitae/'
})
await fs.promises.cp(jsonResumeThemeCustomDist, publicResumeOutputURL, {
recursive: true
})