weasyprint-tsx 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/README.md +1 -1
- package/package.json +1 -1
- package/packages/build/package.json +1 -1
- package/packages/build/src/config.ts +3 -3
- package/packages/build/src/orchestrator.ts +1 -1
- package/packages/ui/package.json +1 -1
- package/packages/ui/src/Equation.tsx +1 -1
- package/packages/ui/src/List.module.css +1 -1
- package/packages/ui/src/index.ts +2 -2
- package/src/index.tsx +2 -4
- package/weasyprint-tsx.config.ts +9 -9
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ export interface Config {
|
|
|
11
11
|
stylesheets?: string[];
|
|
12
12
|
};
|
|
13
13
|
weasyprint?: {
|
|
14
|
-
path
|
|
14
|
+
path?: string;
|
|
15
15
|
verbose?: boolean;
|
|
16
16
|
pdf_forms?: boolean;
|
|
17
17
|
optimize_images?: boolean;
|
|
@@ -48,7 +48,7 @@ const defaultConfig = {
|
|
|
48
48
|
},
|
|
49
49
|
} satisfies Config;
|
|
50
50
|
|
|
51
|
-
export type DConfig = typeof defaultConfig
|
|
51
|
+
export type DConfig = Config & typeof defaultConfig;
|
|
52
52
|
|
|
53
53
|
export function isObject(item: any) {
|
|
54
54
|
return item && typeof item === "object" && !Array.isArray(item);
|
|
@@ -81,7 +81,7 @@ export async function loadConfig(): Promise<DConfig> {
|
|
|
81
81
|
let config = defaultConfig;
|
|
82
82
|
try {
|
|
83
83
|
const { default: userConfig } = await import(`${configPath}`);
|
|
84
|
-
config = mergeDeep(config, userConfig) as
|
|
84
|
+
config = mergeDeep(config, userConfig) as Config as DConfig;
|
|
85
85
|
} catch (e) {
|
|
86
86
|
process.stdout.write(
|
|
87
87
|
`No config file at ${configPath} found, using default.`,
|
|
@@ -17,7 +17,7 @@ export async function devMode(output?: string) {
|
|
|
17
17
|
const WATCH_DIRS = cfg.dev.watch.map((p) => join(process.cwd(), p));
|
|
18
18
|
|
|
19
19
|
if (output) cfg.io.output = cfg.io.output ?? output;
|
|
20
|
-
process.stdout.write(`Dev: http://localhost:${cfg.dev.port}`);
|
|
20
|
+
process.stdout.write(`Dev: http://localhost:${cfg.dev.port}\n`);
|
|
21
21
|
|
|
22
22
|
let pdfBusy = false;
|
|
23
23
|
let lastHash: number | BigInt = 0;
|
package/packages/ui/package.json
CHANGED
package/packages/ui/src/index.ts
CHANGED
|
@@ -5,8 +5,8 @@ export type { CodeBlockProps } from "./CodeBlock";
|
|
|
5
5
|
export { DotLine } from "./DotLine";
|
|
6
6
|
export type { DotLineProps } from "./DotLine";
|
|
7
7
|
export {
|
|
8
|
-
|
|
9
|
-
functionFactory, symbolFactory,
|
|
8
|
+
Equation,
|
|
9
|
+
functionFactory, LtX, symbolFactory,
|
|
10
10
|
underscriptFactory
|
|
11
11
|
} from "./Equation";
|
|
12
12
|
export type { EquationProps, SymbolProps } from "./Equation";
|
package/src/index.tsx
CHANGED
|
@@ -82,11 +82,9 @@ export default function Document() {
|
|
|
82
82
|
</UL>
|
|
83
83
|
</div>
|
|
84
84
|
<div className="w-1/2">
|
|
85
|
-
<H3 color="#1e40af">
|
|
86
|
-
Quick start
|
|
87
|
-
</H3>
|
|
85
|
+
<H3 color="#1e40af">Quick start</H3>
|
|
88
86
|
<OL>
|
|
89
|
-
<LI>bunx
|
|
87
|
+
<LI>bunx @weasyprint-tsx/create my-doc</LI>
|
|
90
88
|
<LI>cd my-doc && bun install</LI>
|
|
91
89
|
<LI>bun run dev</LI>
|
|
92
90
|
</OL>
|
package/weasyprint-tsx.config.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Config } from "./packages/build/src/config";
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
// io: {
|
|
5
|
-
// output: "ReadMe.pdf",
|
|
6
|
-
// },
|
|
7
|
-
|
|
8
4
|
io: {
|
|
9
|
-
output: "
|
|
10
|
-
input: "testUI/index.tsx",
|
|
11
|
-
},
|
|
12
|
-
dev: {
|
|
13
|
-
watch: ["packages/ui/", "testUI"],
|
|
5
|
+
output: "ReadMe.pdf",
|
|
14
6
|
},
|
|
7
|
+
|
|
8
|
+
// io: {
|
|
9
|
+
// output: "TestUI.pdf",
|
|
10
|
+
// input: "testUI/index.tsx",
|
|
11
|
+
// },
|
|
12
|
+
// dev: {
|
|
13
|
+
// watch: ["packages/ui/", "testUI"],
|
|
14
|
+
// },
|
|
15
15
|
} satisfies Config;
|