jsonresume-theme-cjean 1.2.2 → 1.3.0
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/README.md +9 -6
- package/bin/jsonresume-theme-cjean.js +49 -0
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -11,7 +11,8 @@ A clean, professional [JSON Resume](https://jsonresume.org/) theme built with Ta
|
|
|
11
11
|
- **SEO Ready**: Full support for Meta tags, OpenGraph, Twitter Cards, and JSON-LD.
|
|
12
12
|
- **Customizable Aesthetics**: Easy branding via granular `ui` configuration and geometric patterns.
|
|
13
13
|
- **Multi-locale Support**: Comes with `fr` and `en`. Locales are managed in a single file (`i18n.ts`) — feel free to contribute yours!
|
|
14
|
-
- **Modern Tech Stack**: Built with Bun, TypeScript, and
|
|
14
|
+
- **Modern Tech Stack**: Built with Bun, TypeScript, and JSX components.
|
|
15
|
+
- **CLI**: Built-in CLI to render your resume to an HTML file.
|
|
15
16
|
|
|
16
17
|
## Usage
|
|
17
18
|
|
|
@@ -27,18 +28,20 @@ bun install
|
|
|
27
28
|
bun run build
|
|
28
29
|
```
|
|
29
30
|
|
|
30
|
-
###
|
|
31
|
+
### Execution (CLI)
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
While this theme is compatible with the official [resume-cli](https://github.com/jsonresume/resume-cli), it also comes with its own built-in CLI to render your resume to an HTML file:
|
|
34
|
+
|
|
35
|
+
#### Using npx
|
|
33
36
|
|
|
34
37
|
```bash
|
|
35
|
-
|
|
38
|
+
npx jsonresume-theme-cjean resume.json -o resume.html
|
|
36
39
|
```
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
#### Using bunx
|
|
39
42
|
|
|
40
43
|
```bash
|
|
41
|
-
|
|
44
|
+
bunx jsonresume-theme-cjean resume.json -o resume.html
|
|
42
45
|
```
|
|
43
46
|
|
|
44
47
|
## Configuration
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
import { parseArgs } from "node:util";
|
|
5
|
+
import { render } from "../dist/index.js";
|
|
6
|
+
|
|
7
|
+
async function main() {
|
|
8
|
+
const { values, positionals } = parseArgs({
|
|
9
|
+
args: process.argv.slice(2),
|
|
10
|
+
options: {
|
|
11
|
+
help: { type: "boolean", short: "h" },
|
|
12
|
+
output: { type: "string", short: "o" },
|
|
13
|
+
},
|
|
14
|
+
allowPositionals: true,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
if (values.help) {
|
|
18
|
+
console.log(`
|
|
19
|
+
Usage: npx jsonresume-theme-cjean [resume.json]
|
|
20
|
+
|
|
21
|
+
Options:
|
|
22
|
+
-o, --output <file> Output file (default: resume.html)
|
|
23
|
+
-h, --help Show help
|
|
24
|
+
`);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const input = positionals[0] || "resume.json";
|
|
29
|
+
const output = values.output || "resume.html";
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
console.log(`⌛ Rendering resume from ${input}...`);
|
|
33
|
+
const resumePath = resolve(process.cwd(), input);
|
|
34
|
+
const resumeData = JSON.parse(await readFile(resumePath, "utf-8"));
|
|
35
|
+
const html = await render(resumeData);
|
|
36
|
+
const outputPath = resolve(process.cwd(), output);
|
|
37
|
+
await writeFile(outputPath, html);
|
|
38
|
+
console.log(`✅ Successfully exported resume to ${output}`);
|
|
39
|
+
} catch (error) {
|
|
40
|
+
if (error.code === 'ENOENT') {
|
|
41
|
+
console.error(`❌ Error: File not found: ${error.path}`);
|
|
42
|
+
} else {
|
|
43
|
+
console.error(`❌ Error: ${error.message}`);
|
|
44
|
+
}
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
main();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsonresume-theme-cjean",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "A clean, professional, and print-optimized JSON Resume theme built with Tailwind CSS and TypeScript.",
|
|
5
5
|
"author": "Christophe Jean",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
"main": "./dist/index.cjs",
|
|
21
21
|
"module": "./dist/index.js",
|
|
22
22
|
"types": "./dist/index.d.ts",
|
|
23
|
+
"bin": {
|
|
24
|
+
"jsonresume-theme-cjean": "./bin/jsonresume-theme-cjean.js"
|
|
25
|
+
},
|
|
23
26
|
"devDependencies": {
|
|
24
27
|
"@cjean-fr/i18n-tiny": "catalog:",
|
|
25
28
|
"@cjean-fr/jsx-string": "catalog:",
|
|
@@ -43,6 +46,7 @@
|
|
|
43
46
|
},
|
|
44
47
|
"files": [
|
|
45
48
|
"dist",
|
|
49
|
+
"bin",
|
|
46
50
|
"package.json",
|
|
47
51
|
"README.md",
|
|
48
52
|
"LICENSE"
|
|
@@ -51,9 +55,7 @@
|
|
|
51
55
|
"build": "vite build",
|
|
52
56
|
"check": "tsc --noEmit",
|
|
53
57
|
"format": "prettier --write \"**/*.{ts,tsx,json,md}\"",
|
|
54
|
-
"publish": "bun pm pack && npm publish"
|
|
55
|
-
"resume:export": "bunx resume-cli export output.html -t .",
|
|
56
|
-
"resume:serve": "bunx resume-cli serve -t ."
|
|
58
|
+
"publish": "bun pm pack && npm publish"
|
|
57
59
|
},
|
|
58
60
|
"type": "module"
|
|
59
61
|
}
|