add debug_render
This commit is contained in:
parent
0f1637a315
commit
d1ec92f4fd
3 changed files with 10 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
import { Html, render } from "./html.ts";
|
||||
import { Html, debug_render } from "./html.ts";
|
||||
import { Component } from "./jsx/jsx-runtime.ts";
|
||||
|
||||
type DOption = [Html, Dialogue];
|
||||
|
@ -44,6 +44,4 @@ const rd = reify_dialogue([
|
|||
],
|
||||
]);
|
||||
|
||||
console.log(rd);
|
||||
console.log(render(rd));
|
||||
console.log(render(rd, "mini"));
|
||||
debug_render(rd);
|
||||
|
|
|
@ -144,3 +144,9 @@ export function render(elem: Html, mini?: "mini"): string {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
export function debug_render(elem: Html) {
|
||||
console.log(elem);
|
||||
console.log(render(elem));
|
||||
console.log(render(elem, "mini"));
|
||||
}
|
||||
|
|
2
html/ttt.tsx
Normal file
2
html/ttt.tsx
Normal file
|
@ -0,0 +1,2 @@
|
|||
import { Html, render } from "./html.ts";
|
||||
import { Component } from "./jsx/jsx-runtime.ts";
|
Loading…
Reference in a new issue