wp-epub-gen 0.1.1 → 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/dist/parseContent.js +1 -0
- package/package.json +22 -22
- package/src/parseContent.ts +1 -0
package/dist/parseContent.js
CHANGED
|
@@ -15,6 +15,7 @@ function parseContent(content, index, epubConfigs) {
|
|
|
15
15
|
let chapter = Object.assign({}, content);
|
|
16
16
|
if (!chapter.filename) {
|
|
17
17
|
let titleSlug = uslug((0, diacritics_1.remove)(chapter.title || 'no title'));
|
|
18
|
+
titleSlug = titleSlug.replace(/[\/\\]/g, '_');
|
|
18
19
|
chapter.href = `${index}_${titleSlug}.xhtml`;
|
|
19
20
|
chapter.filePath = path.join(epubConfigs.dir, 'OEBPS', chapter.href);
|
|
20
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wp-epub-gen",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Epub generator.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -27,40 +27,40 @@
|
|
|
27
27
|
"@types/diacritics": "^1.3.1",
|
|
28
28
|
"@types/uslug": "^1.0.1",
|
|
29
29
|
"@types/uuid": "^8.3.4",
|
|
30
|
-
"archiver": "^5.3.
|
|
30
|
+
"archiver": "^5.3.1",
|
|
31
31
|
"cheerio": "^0.22.0",
|
|
32
32
|
"diacritics": "^1.3.0",
|
|
33
|
-
"ejs": "^3.1.
|
|
34
|
-
"entities": "^
|
|
35
|
-
"fs-extra": "^10.0
|
|
33
|
+
"ejs": "^3.1.8",
|
|
34
|
+
"entities": "^4.4.0",
|
|
35
|
+
"fs-extra": "^10.1.0",
|
|
36
36
|
"mime": "^3.0.0",
|
|
37
|
-
"superagent": "^
|
|
37
|
+
"superagent": "^8.0.2",
|
|
38
38
|
"uslug": "^1.0.4",
|
|
39
|
-
"uuid": "^
|
|
39
|
+
"uuid": "^9.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/archiver": "^5.3.1",
|
|
43
43
|
"@types/cheerio": "^0.22.31",
|
|
44
|
-
"@types/ejs": "^3.1.
|
|
44
|
+
"@types/ejs": "^3.1.1",
|
|
45
45
|
"@types/fs-extra": "^9.0.13",
|
|
46
|
-
"@types/mime": "^
|
|
46
|
+
"@types/mime": "^3.0.1",
|
|
47
47
|
"@types/superagent": "^4.1.15",
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
49
|
-
"@typescript-eslint/parser": "^5.
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
|
49
|
+
"@typescript-eslint/parser": "^5.38.1",
|
|
50
50
|
"chai": "^4.3.6",
|
|
51
51
|
"cross-env": "^7.0.3",
|
|
52
|
-
"eslint": "^8.
|
|
52
|
+
"eslint": "^8.24.0",
|
|
53
53
|
"eslint-config-prettier": "^8.5.0",
|
|
54
|
-
"eslint-plugin-import": "^2.
|
|
55
|
-
"espower-typescript": "^10.0.
|
|
56
|
-
"mocha": "^
|
|
57
|
-
"prettier": "^2.
|
|
58
|
-
"terser-webpack-plugin": "^5.3.
|
|
59
|
-
"ts-loader": "^9.
|
|
60
|
-
"tsconfig-paths": "^
|
|
61
|
-
"typescript": "^4.
|
|
62
|
-
"webpack": "^5.
|
|
63
|
-
"webpack-cli": "^4.
|
|
54
|
+
"eslint-plugin-import": "^2.26.0",
|
|
55
|
+
"espower-typescript": "^10.0.1",
|
|
56
|
+
"mocha": "^10.0.0",
|
|
57
|
+
"prettier": "^2.7.1",
|
|
58
|
+
"terser-webpack-plugin": "^5.3.6",
|
|
59
|
+
"ts-loader": "^9.4.1",
|
|
60
|
+
"tsconfig-paths": "^4.1.0",
|
|
61
|
+
"typescript": "^4.8.4",
|
|
62
|
+
"webpack": "^5.74.0",
|
|
63
|
+
"webpack-cli": "^4.10.0",
|
|
64
64
|
"webpack-notifier": "^1.15.0"
|
|
65
65
|
}
|
|
66
66
|
}
|
package/src/parseContent.ts
CHANGED
|
@@ -21,6 +21,7 @@ export default function parseContent(
|
|
|
21
21
|
|
|
22
22
|
if (!chapter.filename) {
|
|
23
23
|
let titleSlug = uslug(removeDiacritics(chapter.title || 'no title'))
|
|
24
|
+
titleSlug = titleSlug.replace(/[\/\\]/g, '_')
|
|
24
25
|
chapter.href = `${index}_${titleSlug}.xhtml`
|
|
25
26
|
chapter.filePath = path.join(epubConfigs.dir, 'OEBPS', chapter.href)
|
|
26
27
|
} else {
|