json-theme-even-fork/index.js

18 lines
422 B
JavaScript
Raw Normal View History

import fs from 'fs'
import path from 'path'
import { fileURLToPath } from 'url'
2018-09-23 20:28:05 +02:00
import Resume from './resume.js'
const dirname = typeof __dirname === 'string'
? __dirname
: path.dirname(fileURLToPath(import.meta.url))
export const pdfRenderOptions = { mediaType: 'print' }
2020-11-03 17:44:00 +01:00
export const render = resume => {
2021-11-14 15:47:22 +01:00
const css = fs.readFileSync(path.resolve(dirname, 'style.css'), 'utf-8')
2020-07-05 14:54:30 +02:00
return Resume(resume, css)
2020-07-05 14:54:30 +02:00
}