jsonresume-theme-engineering 0.5.3 → 0.6.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/.nvmrc +1 -1
- package/.prettierignore +3 -0
- package/index.js +10 -8
- package/package.json +7 -2
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
24.13.1
|
package/.prettierignore
ADDED
package/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
const
|
|
2
|
-
fs = require('fs'),
|
|
1
|
+
const fs = require('fs'),
|
|
3
2
|
path = require('path'),
|
|
4
3
|
Handlebars = require('handlebars'),
|
|
5
4
|
addressFormat = require('address-format'),
|
|
6
5
|
moment = require('moment');
|
|
7
6
|
|
|
8
7
|
Handlebars.registerHelper({
|
|
9
|
-
|
|
10
8
|
wrapURL: function (url) {
|
|
11
|
-
const wrappedUrl =
|
|
9
|
+
const wrappedUrl =
|
|
10
|
+
'<a href="' + url + '">' + url.replace(/.*?:\/\//g, '') + '</a>';
|
|
12
11
|
return new Handlebars.SafeString(wrappedUrl);
|
|
13
12
|
},
|
|
14
13
|
|
|
15
14
|
wrapMail: function (address) {
|
|
16
|
-
const wrappedAddress =
|
|
15
|
+
const wrappedAddress =
|
|
16
|
+
'<a href="mailto:' + address + '">' + address + '</a>';
|
|
17
17
|
return new Handlebars.SafeString(wrappedAddress);
|
|
18
18
|
},
|
|
19
19
|
|
|
@@ -23,7 +23,7 @@ Handlebars.registerHelper({
|
|
|
23
23
|
city: city,
|
|
24
24
|
subdivision: region,
|
|
25
25
|
postalCode: postalCode,
|
|
26
|
-
countryCode: countryCode
|
|
26
|
+
countryCode: countryCode,
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
return addressList.join('<br/>');
|
|
@@ -34,7 +34,9 @@ Handlebars.registerHelper({
|
|
|
34
34
|
},
|
|
35
35
|
|
|
36
36
|
getValueIfDiffFromPrevious: function (array, index, key) {
|
|
37
|
-
return
|
|
37
|
+
return array[index - 1] && array[index][key] === array[index - 1][key]
|
|
38
|
+
? ''
|
|
39
|
+
: array[index][key];
|
|
38
40
|
},
|
|
39
41
|
});
|
|
40
42
|
|
|
@@ -85,7 +87,7 @@ function render(resume) {
|
|
|
85
87
|
|
|
86
88
|
return Handlebars.compile(resumeTemplate)({
|
|
87
89
|
css: css,
|
|
88
|
-
resume: resume
|
|
90
|
+
resume: resume,
|
|
89
91
|
});
|
|
90
92
|
}
|
|
91
93
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsonresume-theme-engineering",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "JSON Resume theme for engineers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jsonresume",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"html": "resumed render --theme jsonresume-theme-engineering",
|
|
22
22
|
"pdf": "resumed export --theme jsonresume-theme-engineering",
|
|
23
|
-
"test": "mocha test/*.test.js"
|
|
23
|
+
"test": "mocha test/*.test.js",
|
|
24
|
+
"lint": "prettier --write \"**/*.{js,cjs,mjs,json}\""
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
27
|
"address-format": "0.0.3",
|
|
@@ -33,8 +34,12 @@
|
|
|
33
34
|
"mocha": "^11.7.2",
|
|
34
35
|
"pdf-parse": "^2.0.0",
|
|
35
36
|
"pngjs": "^7.0.0",
|
|
37
|
+
"prettier": "^3.8.1",
|
|
36
38
|
"puppeteer": "^24.22.3",
|
|
37
39
|
"resumed": "^6.1.0",
|
|
38
40
|
"sinon": "^21.0.0"
|
|
41
|
+
},
|
|
42
|
+
"prettier": {
|
|
43
|
+
"singleQuote": true
|
|
39
44
|
}
|
|
40
45
|
}
|