@kolkrabbi/kol-resume 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/vite.js +6 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-resume",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "A resume kit that prints to PDF",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./src/index.js",
|
package/src/vite.js
CHANGED
|
@@ -16,6 +16,8 @@ import { readFile } from 'node:fs/promises'
|
|
|
16
16
|
import { join, dirname } from 'node:path'
|
|
17
17
|
import { fileURLToPath } from 'node:url'
|
|
18
18
|
|
|
19
|
+
// run through bash, never directly: npm sets the exec bit on "bin" files only, so an installed copy is rw-r--r--
|
|
20
|
+
// (KolResumeExportNotExecutable)
|
|
19
21
|
const SCRIPT = join(dirname(fileURLToPath(import.meta.url)), '..', 'bin', 'export-kit.sh')
|
|
20
22
|
|
|
21
23
|
export function kitExportPlugin({ name = 'kit' } = {}) {
|
|
@@ -36,22 +38,22 @@ export function kitExportPlugin({ name = 'kit' } = {}) {
|
|
|
36
38
|
let cmd, file, mime, filename
|
|
37
39
|
if (layout && LAYOUT_SLUGS.includes(layout)) {
|
|
38
40
|
const stem = `${name}-layout-${layout}${suffix}`
|
|
39
|
-
cmd = `"${SCRIPT}" --single=/resume/t/${layout}:${stem}${langFlag}`
|
|
41
|
+
cmd = `bash "${SCRIPT}" --single=/resume/t/${layout}:${stem}${langFlag}`
|
|
40
42
|
file = join(root, 'out', `${stem}.pdf`)
|
|
41
43
|
mime = 'application/pdf'
|
|
42
44
|
filename = `${stem}.pdf`
|
|
43
45
|
} else if (svg) {
|
|
44
46
|
filename = `${name}-kit${suffix}-svg.zip`
|
|
45
|
-
cmd = `"${SCRIPT}" --svg${langFlag} && cd out && rm -f "${filename}" && zip -j -q "${filename}" svg/*.svg`
|
|
47
|
+
cmd = `bash "${SCRIPT}" --svg${langFlag} && cd out && rm -f "${filename}" && zip -j -q "${filename}" svg/*.svg`
|
|
46
48
|
file = join(root, 'out', filename)
|
|
47
49
|
mime = 'application/zip'
|
|
48
50
|
} else if (continuous) {
|
|
49
|
-
cmd = `"${SCRIPT}" --continuous${langFlag}`
|
|
51
|
+
cmd = `bash "${SCRIPT}" --continuous${langFlag}`
|
|
50
52
|
file = join(root, 'out', `${name}-kit-continuous${suffix}.pdf`)
|
|
51
53
|
mime = 'application/pdf'
|
|
52
54
|
filename = `${name}-kit${suffix}-continuous.pdf`
|
|
53
55
|
} else {
|
|
54
|
-
cmd = `"${SCRIPT}" --v2${langFlag}`
|
|
56
|
+
cmd = `bash "${SCRIPT}" --v2${langFlag}`
|
|
55
57
|
file = join(root, 'out', `${name}-kit-light-v2${suffix}.pdf`)
|
|
56
58
|
mime = 'application/pdf'
|
|
57
59
|
filename = `${name}-kit${suffix}.pdf`
|