@unfoldingword/door43-preview-renderers 1.5.0 → 1.5.1
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 +6 -4
- package/src/cli.js +10 -5
- package/dist/index.js +0 -94847
package/package.json
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unfoldingword/door43-preview-renderers",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "JavaScript library for gathering content from various repositories and rendering HTML snippets for web previews and PDFs",
|
|
6
|
-
"main": "dist/index.js",
|
|
6
|
+
"main": "dist/index.esm.js",
|
|
7
7
|
"module": "dist/index.esm.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/index.esm.js"
|
|
10
|
+
},
|
|
8
11
|
"bin": {
|
|
9
|
-
"door43-renderers": "
|
|
12
|
+
"door43-renderers": "src/cli.js"
|
|
10
13
|
},
|
|
11
14
|
"publishConfig": {
|
|
12
15
|
"access": "public"
|
|
13
16
|
},
|
|
14
17
|
"files": [
|
|
15
|
-
"dist/index.js",
|
|
16
18
|
"dist/index.esm.js",
|
|
17
19
|
"src/cli.js"
|
|
18
20
|
],
|
package/src/cli.js
CHANGED
|
@@ -10,11 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
import fs from 'fs';
|
|
12
12
|
import path from 'path';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
|
|
13
|
+
// Import from the built package entry, not src siblings: only dist/index.esm.js
|
|
14
|
+
// and this file are published, so the installed `door43-renderers` bin must
|
|
15
|
+
// resolve against dist. (Running from source therefore requires `pnpm build`.)
|
|
16
|
+
import {
|
|
17
|
+
getAllCatalogEntries,
|
|
18
|
+
getResourceData,
|
|
19
|
+
renderHtmlData,
|
|
20
|
+
renderHTML,
|
|
21
|
+
renderPdf,
|
|
22
|
+
} from '../dist/index.esm.js';
|
|
18
23
|
|
|
19
24
|
// Map the CLI's short page-size keys to PAGE_SIZES keys understood by renderHTML/renderPdf.
|
|
20
25
|
function resolveCliPageSize(shortKey) {
|