Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

writeHtmlBundle

import { writeHtmlBundle } from "https://raw.githubusercontent.com/Hatscat/MetavaScript/main/index.ts";

utility function to write a Web App source code in a file

@example
// write "<title>template</title><style>h1{text-align:center}</style><h1 id=h><script>h.innerHTML='hello!'</script>" in the "dist/index.html" file
writeHtmlBundle({
  css: formatStylesheet({ h1: { textAlign: "center" } }),
  js: setInnerHtml("h", Text("hello!")),
  html: {
    head: [
      titleTag("Title"),
    ],
    body: [
      element("h1", { tagProps: { id: "h" } }),
    ],
  }
})
async function writeHtmlBundle({ css, html, js, outputPath }: SrcProps): Promise<void>;
§
writeHtmlBundle({ css, html, js, outputPath }: SrcProps): Promise<void>
[src]

§Parameters

§
{ css, html, js, outputPath }: SrcProps
[src]

§Return Type

§
Promise<void>
[src]