docgen-tool 6.1.0 → 6.1.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/dist/app/pdf/pdf-generator/pdf-page/pdf-html-block/custom-renderers/custom-renderers.tsx
CHANGED
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { View, Text, Image } from '@react-pdf/renderer';
|
|
3
3
|
import * as cheerio from 'cheerio';
|
|
4
4
|
|
|
5
|
+
declare const __BASE_PATH__: string;
|
|
6
|
+
|
|
5
7
|
/*
|
|
6
8
|
For "default" renderers in react-pdf-html, see
|
|
7
9
|
|
|
@@ -37,6 +39,11 @@ export const customRenderers = ({ options }) => ({
|
|
|
37
39
|
img: (payload) => {
|
|
38
40
|
const { element, style } = payload;
|
|
39
41
|
// Load images from base URL
|
|
40
|
-
return
|
|
42
|
+
return (
|
|
43
|
+
<Image
|
|
44
|
+
style={style}
|
|
45
|
+
source={`${__BASE_PATH__}${element?.attributes?.src}`}
|
|
46
|
+
/>
|
|
47
|
+
);
|
|
41
48
|
},
|
|
42
49
|
});
|
package/dist/cli/cli.js
CHANGED
|
@@ -283,7 +283,7 @@ const basePath = process.env.BASE_PATH || "/", generate = async (command, mode)
|
|
|
283
283
|
}, scaffold = async (command) => {
|
|
284
284
|
const inputDir = findTemplateDir(import.meta.dirname), outputDir = path.normalize(command.output + "/"), verbose = command.verbose === true;
|
|
285
285
|
console.log(pico.green("Creating scaffold template directory")), await copyDirectory(inputDir, outputDir, verbose);
|
|
286
|
-
}, version = "6.1.
|
|
286
|
+
}, version = "6.1.1";
|
|
287
287
|
if (program.version(version).usage("[command] [--option]"), program.command("scaffold").usage("[--option]").description("create a template input directory").option("-o, --output [path]", "path to the output directory (default: ./)", "./").option("-v, --verbose", "show verbose output including detailed errors").action((command) => {
|
|
288
288
|
scaffold(command);
|
|
289
289
|
}), program.command("dev").usage("[--option]").description("create a static website from an input directory").option("-i, --input [path]", "path to the input directory [default: ./]", "./").option("-o, --output [path]", "path to the output directory [default: ./output]", "./output").option("-p, --pdf", "create a PDF document").option("-s, --set-version [version]", "override parameters.version (useful for build tools) [default: false]", false).option("-R, --set-release-date [date]", "override parameters.date (useful for build tools) [default: false]", false).option("-v, --verbose", "show verbose output including detailed errors").action((command) => {
|