2023-03-20 10:22:25 +08:00
|
|
|
const [index, template, style, bind] = await Promise.all([
|
2023-03-04 15:52:16 +08:00
|
|
|
Deno.readTextFile("./ui/index/index.html"),
|
2023-03-20 10:22:25 +08:00
|
|
|
Deno.readTextFile("./ui/index/template.html"),
|
|
|
|
Deno.readTextFile("./ui/index/style.css"),
|
2023-03-04 15:52:16 +08:00
|
|
|
Deno.readTextFile("./ui/bind/bind.js"),
|
|
|
|
])
|
2023-03-20 10:22:25 +08:00
|
|
|
const ui = index
|
2023-03-04 15:52:16 +08:00
|
|
|
.replace("<template></template>", template)
|
2023-03-20 10:22:25 +08:00
|
|
|
.replace("<style></style>", `<style>\n${style}\n</style>`)
|
2023-03-04 15:52:16 +08:00
|
|
|
.replace("<script></script>", `<script type="module">\n${bind}\n</script>`)
|
2023-03-20 10:22:25 +08:00
|
|
|
|
|
|
|
Deno.writeTextFileSync("../ui/index.html", ui)
|
|
|
|
|
|
|
|
console.log(`index: ${index.length}\ntemplate: ${template.length}\nstyle: ${style.length}\nbind: ${bind.length}\n\nui: ${ui.length}`)
|