@pyreon/runtime-server 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -6
- package/package.json +5 -6
package/README.md
CHANGED
|
@@ -10,15 +10,14 @@ bun add @pyreon/runtime-server
|
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
13
|
-
```
|
|
13
|
+
```tsx
|
|
14
14
|
import { renderToString } from "@pyreon/runtime-server"
|
|
15
|
-
import { h } from "@pyreon/core"
|
|
16
15
|
|
|
17
16
|
function App() {
|
|
18
|
-
return
|
|
17
|
+
return <h1>Hello from SSR</h1>
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
const html = await renderToString(
|
|
20
|
+
const html = await renderToString(<App />)
|
|
22
21
|
// "<h1>Hello from SSR</h1>"
|
|
23
22
|
```
|
|
24
23
|
|
|
@@ -32,10 +31,10 @@ Render a VNode tree to a complete HTML string. Returns `Promise<string>`. Async
|
|
|
32
31
|
|
|
33
32
|
Render a VNode tree to a `ReadableStream<string>` for progressive HTML streaming. Synchronous subtrees are flushed immediately. Suspense boundaries are streamed out-of-order: the fallback is emitted first, then resolved children are sent as `<template>` elements with inline swap scripts.
|
|
34
33
|
|
|
35
|
-
```
|
|
34
|
+
```tsx
|
|
36
35
|
import { renderToStream } from "@pyreon/runtime-server"
|
|
37
36
|
|
|
38
|
-
const stream = renderToStream(
|
|
37
|
+
const stream = renderToStream(<App />)
|
|
39
38
|
return new Response(stream, {
|
|
40
39
|
headers: { "Content-Type": "text/html" },
|
|
41
40
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pyreon/runtime-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "SSR/SSG renderer for Pyreon — streaming HTML + static generation",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -35,13 +35,12 @@
|
|
|
35
35
|
"dev": "vl_rolldown_build-watch",
|
|
36
36
|
"test": "vitest run",
|
|
37
37
|
"typecheck": "tsc --noEmit",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"postpack": "bun run ../../scripts/resolve-workspace-deps.ts post"
|
|
38
|
+
"lint": "biome check .",
|
|
39
|
+
"prepublishOnly": "bun run build"
|
|
41
40
|
},
|
|
42
41
|
"dependencies": {
|
|
43
|
-
"@pyreon/core": "
|
|
44
|
-
"@pyreon/reactivity": "
|
|
42
|
+
"@pyreon/core": "workspace:*",
|
|
43
|
+
"@pyreon/reactivity": "workspace:*"
|
|
45
44
|
},
|
|
46
45
|
"publishConfig": {
|
|
47
46
|
"access": "public"
|