-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
23 lines (22 loc) · 806 Bytes
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const
handlebars = require("vite-plugin-handlebars"),
viteSingleFile = require("vite-plugin-singlefile").viteSingleFile,
resolve = require("path").resolve;
module.exports = (resume) => ({
root: resolve(__dirname),
plugins: [
handlebars({
partialDirectory: resolve(__dirname, "src/partials"),
context: {
resume: resume,
},
helpers: {
decapitalize: (str) => str.toLowerCase(),
month: (str) => ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"][new Date(str).getMonth()],
year: (str) => new Date(str).getFullYear(),
localDate: (str) => new Date(str).toLocaleDateString("uk"),
},
}),
viteSingleFile(),
],
});