wp-epub-gen 0.1.2 → 0.1.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wp-epub-gen",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Epub generator.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  "entities": "^4.4.0",
35
35
  "fs-extra": "^10.1.0",
36
36
  "mime": "^3.0.0",
37
- "superagent": "^8.0.2",
37
+ "superagent": "^8.0.3",
38
38
  "uslug": "^1.0.4",
39
39
  "uuid": "^9.0.0"
40
40
  },
@@ -45,22 +45,22 @@
45
45
  "@types/fs-extra": "^9.0.13",
46
46
  "@types/mime": "^3.0.1",
47
47
  "@types/superagent": "^4.1.15",
48
- "@typescript-eslint/eslint-plugin": "^5.38.1",
49
- "@typescript-eslint/parser": "^5.38.1",
50
- "chai": "^4.3.6",
48
+ "@typescript-eslint/eslint-plugin": "^5.43.0",
49
+ "@typescript-eslint/parser": "^5.43.0",
50
+ "chai": "^4.3.7",
51
51
  "cross-env": "^7.0.3",
52
- "eslint": "^8.24.0",
52
+ "eslint": "^8.28.0",
53
53
  "eslint-config-prettier": "^8.5.0",
54
54
  "eslint-plugin-import": "^2.26.0",
55
55
  "espower-typescript": "^10.0.1",
56
- "mocha": "^10.0.0",
56
+ "mocha": "^10.1.0",
57
57
  "prettier": "^2.7.1",
58
58
  "terser-webpack-plugin": "^5.3.6",
59
59
  "ts-loader": "^9.4.1",
60
60
  "tsconfig-paths": "^4.1.0",
61
- "typescript": "^4.8.4",
62
- "webpack": "^5.74.0",
63
- "webpack-cli": "^4.10.0",
61
+ "typescript": "^4.9.3",
62
+ "webpack": "^5.75.0",
63
+ "webpack-cli": "^5.0.0",
64
64
  "webpack-notifier": "^1.15.0"
65
65
  }
66
66
  }
@@ -8,14 +8,11 @@
8
8
  xmlns:media="http://www.idpf.org/epub/vocab/overlays/#"
9
9
  prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/">
10
10
 
11
- <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"
12
- xmlns:opf="http://www.idpf.org/2007/opf">
11
+ <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
13
12
 
14
13
  <dc:identifier id="BookId"><%= id %></dc:identifier>
15
- <meta refines="#BookId" property="identifier-type" scheme="onix:codelist5">
16
- 22</meta>
17
- <meta property="dcterms:identifier" id="meta-identifier">
18
- BookId</meta>
14
+ <meta refines="#BookId" property="identifier-type" scheme="onix:codelist5">22</meta>
15
+ <meta property="dcterms:identifier" id="meta-identifier">BookId</meta>
19
16
  <dc:title><%= title %></dc:title>
20
17
  <meta property="dcterms:title" id="meta-title"><%= title %></meta>
21
18
  <dc:language><%= lang || "en" %></dc:language>
@@ -28,31 +25,31 @@
28
25
  <% var date = new Date(); var year = date.getFullYear(); var month = date.getMonth() + 1; var day = date.getDate(); var stringDate = "" + year + "-" + month + "-" + day; %>
29
26
  <meta property="dcterms:date"><%= stringDate %></meta>
30
27
  <dc:date><%= stringDate %></dc:date>
31
- <meta property="dcterms:rights">
32
- All rights reserved</meta>
28
+ <meta property="dcterms:rights">All rights reserved</meta>
33
29
  <dc:rights>Copyright &#x00A9; <%= (new Date()).getFullYear() %> by <%= publisher || "anonymous" %></dc:rights>
34
- <meta name="cover" content="image_cover"/>
35
- <meta name="generator" content="epub-gen"/>
36
- <meta property="ibooks:specified-fonts">
37
- true</meta>
30
+ <% if(locals.cover) { %>
31
+ <meta name="cover" content="image_cover" />
32
+ <% } %>
33
+ <meta name="generator" content="epub-gen" />
34
+ <meta property="ibooks:specified-fonts">true</meta>
38
35
  </metadata>
39
36
 
40
37
  <manifest>
41
- <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
42
- <item id="toc" href="toc.xhtml" media-type="application/xhtml+xml" properties="nav"/>
43
- <item id="css" href="style.css" media-type="text/css"/>
38
+ <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml" />
39
+ <item id="toc" href="toc.xhtml" media-type="application/xhtml+xml" properties="nav" />
40
+ <item id="css" href="style.css" media-type="text/css" />
44
41
 
45
42
  <% if(locals.cover) { %>
46
- <item id="image_cover" href="cover.<%= _coverExtension %>" media-type="<%= _coverMediaType %>"/>
43
+ <item id="image_cover" href="cover.<%= _coverExtension %>" media-type="<%= _coverMediaType %>" />
47
44
  <% } %>
48
45
 
49
46
  <% images.forEach(function(image, index){ %>
50
- <item id="image_<%= index %>" href="images/<%= image.id %>.<%= image.extension %>" media-type="<%= image.mediaType %>"/>
47
+ <item id="image_<%= index %>" href="images/<%= image.id %>.<%= image.extension %>" media-type="<%= image.mediaType %>" />
51
48
  <% }) %>
52
49
 
53
50
  <% function renderContentItem(content) { %>
54
51
  <% content.forEach(function(content){ %>
55
- <item id="content_<%= content.id %>" href="<%= content.href %>" media-type="application/xhtml+xml"/>
52
+ <item id="content_<%= content.id %>" href="<%= content.href %>" media-type="application/xhtml+xml" />
56
53
  <% if (Array.isArray(content.children)) { %>
57
54
  <% renderContentItem(content.children) %>
58
55
  <% } %>
@@ -61,7 +58,7 @@
61
58
  <% renderContentItem(content) %>
62
59
 
63
60
  <% fonts.forEach(function(font, index){ %>
64
- <item id="font_<%= index %>" href="fonts/<%= font %>" media-type="application/x-font-ttf"/>
61
+ <item id="font_<%= index %>" href="fonts/<%= font %>" media-type="application/x-font-ttf" />
65
62
  <% }) %>
66
63
  </manifest>
67
64
 
@@ -70,17 +67,17 @@
70
67
  <% var nodes_2 = content.filter(item => !item.excludeFromToc && !item.beforeToc) %>
71
68
  <% function renderToc(nodes) { %>
72
69
  <% nodes.forEach(function(content){ %>
73
- <itemref idref="content_<%= content.id %>"/>
70
+ <itemref idref="content_<%= content.id %>" />
74
71
  <% if (Array.isArray(content.children)) { %>
75
72
  <% renderToc(content.children) %>
76
73
  <% } %>
77
74
  <% }) %>
78
75
  <% } %>
79
76
  <% renderToc(nodes_1) %>
80
- <itemref idref="toc"/>
77
+ <itemref idref="toc" />
81
78
  <% renderToc(nodes_2) %>
82
79
  </spine>
83
80
  <guide>
84
- <reference type="text" title="Table of Content" href="toc.xhtml"/>
81
+ <reference type="text" title="Table of Content" href="toc.xhtml" />
85
82
  </guide>
86
83
  </package>