@enure/jacklin 1.3.5 → 2.0.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/CLAUDE.md +106 -0
- package/README.md +13 -0
- package/dist/index.js +5565 -0
- package/{index.js → index.ts} +13 -1
- package/package.json +15 -7
- package/template.handlebars +1 -1
- package/tsconfig.json +29 -0
package/{index.js → index.ts}
RENAMED
|
@@ -7,13 +7,25 @@ Handlebars.registerHelper("summaryToList", (string) => {
|
|
|
7
7
|
if (string.includes("|")) {
|
|
8
8
|
return `<ul class="SummaryList">${string
|
|
9
9
|
.split("|")
|
|
10
|
-
.map((listItem) => `<li class="SummaryList-item">${listItem}</li>`)
|
|
10
|
+
.map((listItem: string) => `<li class="SummaryList-item">${listItem}</li>`)
|
|
11
11
|
.join("")}</ul>`;
|
|
12
12
|
} else {
|
|
13
13
|
return string;
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
+
Handlebars.registerHelper("getShortDate", (dateStr) => {
|
|
18
|
+
if (typeof dateStr === 'string') {
|
|
19
|
+
const date = new Date(dateStr);
|
|
20
|
+
const year = date.getFullYear();
|
|
21
|
+
const month = date.getMonth();
|
|
22
|
+
const fullMonth = month.toString().length === 1 ? `0${month}` : month;
|
|
23
|
+
return `${year}-${fullMonth}`;
|
|
24
|
+
} else {
|
|
25
|
+
return dateStr;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
17
29
|
export const render = (resume) => {
|
|
18
30
|
const modulePath = dirname(fileURLToPath(import.meta.url));
|
|
19
31
|
const template = readFileSync(
|
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enure/jacklin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "index.js",
|
|
7
|
-
"exports":
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
"default": "./dist/index.js",
|
|
9
|
+
"bun": "./index.ts"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "bun build ./index.ts --target=node --outdir ./dist"
|
|
13
|
+
},
|
|
8
14
|
"keywords": [],
|
|
9
15
|
"author": "Charles Stuart",
|
|
10
16
|
"license": "ISC",
|
|
@@ -12,9 +18,11 @@
|
|
|
12
18
|
"handlebars": "^4.7.8"
|
|
13
19
|
},
|
|
14
20
|
"devDependencies": {
|
|
15
|
-
"
|
|
21
|
+
"@types/bun": "latest",
|
|
22
|
+
"resumed": "^6.1.0"
|
|
16
23
|
},
|
|
17
|
-
"
|
|
18
|
-
|
|
24
|
+
"packageManager": "pnpm@10.18.1+sha512.77a884a165cbba2d8d1c19e3b4880eee6d2fcabd0d879121e282196b80042351d5eb3ca0935fa599da1dc51265cc68816ad2bddd2a2de5ea9fdf92adbec7cd34",
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"typescript": "^5"
|
|
19
27
|
}
|
|
20
|
-
}
|
|
28
|
+
}
|
package/template.handlebars
CHANGED
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
{{this.position}} at {{this.name}}
|
|
140
140
|
</div>
|
|
141
141
|
<div class="WorkList-dates">
|
|
142
|
-
{{this.startDate}} to {{#if this.endDate }}{{this.endDate}}{{/if}}{{#unless this.endDate }}current{{/unless}}
|
|
142
|
+
{{getShortDate this.startDate}} to {{#if this.endDate }}{{getShortDate this.endDate}}{{/if}}{{#unless this.endDate }}current{{/unless}}
|
|
143
143
|
</div>
|
|
144
144
|
<div class="WorkList-summary">
|
|
145
145
|
{{{summaryToList this.summary}}}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// Environment setup & latest features
|
|
4
|
+
"lib": ["ESNext"],
|
|
5
|
+
"target": "ESNext",
|
|
6
|
+
"module": "Preserve",
|
|
7
|
+
"moduleDetection": "force",
|
|
8
|
+
"jsx": "react-jsx",
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
|
|
11
|
+
// Bundler mode
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"allowImportingTsExtensions": true,
|
|
14
|
+
"verbatimModuleSyntax": true,
|
|
15
|
+
"noEmit": true,
|
|
16
|
+
|
|
17
|
+
// Best practices
|
|
18
|
+
"strict": true,
|
|
19
|
+
"skipLibCheck": true,
|
|
20
|
+
"noFallthroughCasesInSwitch": true,
|
|
21
|
+
"noUncheckedIndexedAccess": true,
|
|
22
|
+
"noImplicitOverride": true,
|
|
23
|
+
|
|
24
|
+
// Some stricter flags (disabled by default)
|
|
25
|
+
"noUnusedLocals": false,
|
|
26
|
+
"noUnusedParameters": false,
|
|
27
|
+
"noPropertyAccessFromIndexSignature": false,
|
|
28
|
+
}
|
|
29
|
+
}
|