WebGen 2.0
A SwftUI-like Webframework
Getting Started
// Create a mod.ts file
import { PlainText, View, WebGen } from "https://deno.land/x/webgen/mod.ts";
WebGen();
View(() => PlainText("Hello World!")).appendOn(document.body);
// Create a serve.ts file
import { serve } from "https://deno.land/x/esbuild_serve/mod.ts";
serve({
pages: {
"index": "./mod.ts",
},
});
<!-- Create a templates/index.html file -->
<link rel="stylesheet" href="index.css">
<script src="index.js"></script>
deno run -A --no-check serve.ts
Done! Have fun! More docs will follow