add debug_render

This commit is contained in:
mehbark 2023-07-09 13:22:38 -04:00
parent 0f1637a315
commit d1ec92f4fd
3 changed files with 10 additions and 4 deletions

View file

@ -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);

View file

@ -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
View file

@ -0,0 +1,2 @@
import { Html, render } from "./html.ts";
import { Component } from "./jsx/jsx-runtime.ts";