-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e64253d
commit a06b4d7
Showing
13 changed files
with
382 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
www/html/mizu/examples/browsers/client2.html → www/html/mizu/examples/browsers/esm.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>ESM</title> | ||
<meta charset="UTF-8" /> | ||
</head> | ||
<body> | ||
|
1 change: 1 addition & 0 deletions
1
www/html/mizu/examples/browsers/client.html → www/html/mizu/examples/browsers/iife.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>IIFE</title> | ||
<meta charset="UTF-8" /> | ||
</head> | ||
<body> | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env -S deno run --allow-read --allow-env --allow-net --allow-write=/tmp/output | ||
// Static Site Generation (SSG) with Mizu | ||
// deno-lint-ignore no-external-import | ||
import Mizu from "jsr:@mizu/render/static" | ||
|
||
await Mizu.generate([ | ||
// Copy content from strings | ||
[`<div *text="foo"></div>`, "index.html", { render: { context: { foo: "🌊 Yaa, mizu!" } } }], | ||
// Copy content from callback return | ||
[() => JSON.stringify(Date.now()), "timestamp.json"], | ||
// Copy content from local files | ||
["**/*", "static", { directory: "/fake/path" }], | ||
// Copy content from URL | ||
[new URL("https://matcha.mizu.sh/matcha.css"), "styles.css"], | ||
], { clean: true, output: "/tmp/output" }) |
7 changes: 3 additions & 4 deletions
7
www/html/mizu/examples/deno/server.ts → www/html/mizu/examples/deno/ssr.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
#!/usr/bin/env -S deno serve --allow-read --allow-env | ||
// Server-Side Rendering (SSR) with Mizu | ||
// deno-lint-ignore no-external-import | ||
import Mizu from "jsr:@mizu/render/server" | ||
|
||
const template = `<div *text="foo"></div>` | ||
const context = { foo: "🌊 Yaa, mizu!" } | ||
|
||
export default { | ||
async fetch() { | ||
const headers = new Headers({ "Content-Type": "text/html; charset=utf-8" }) | ||
return new Response(await Mizu.render(template, { context }), { headers }) | ||
const body = await Mizu.render(`<div *text="foo"></div>`, { context: { foo: "🌊 Yaa, mizu!" } }) | ||
return new Response(body, { headers }) | ||
}, | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.