Skip to content

Commit 1e562cb

Browse files
authored
Update xote from 6.2 to 7.1 in templates (#130)
* Remove package-lock files from xote templates * Update xote from 6.2 to 7.1 in templates
1 parent 8643d4c commit 1e562cb

10 files changed

Lines changed: 35 additions & 3725 deletions

File tree

‎templates/rescript-template-xote-ssr/package-lock.json‎

Lines changed: 0 additions & 1844 deletions
This file was deleted.

‎templates/rescript-template-xote-ssr/package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
"build:ssr": "vite build --ssr src/Server.res.mjs --outDir dist/server"
1515
},
1616
"dependencies": {
17-
"rescript-signals": "^3.1.0",
18-
"xote": "^6.2.0"
17+
"xote": "^7.1.0"
1918
},
2019
"devDependencies": {
2120
"@tailwindcss/vite": "^4.0.0",

‎templates/rescript-template-xote-ssr/rescript.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
"version": 4,
1717
"module": "XoteJSX"
1818
},
19+
"ppx-flags": ["xote/ppx/ppx"],
1920
"compiler-flags": ["-open Xote"]
2021
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@jsx.component
1+
@xote.component
22
let make = () => {
33
let count = SSRState.signal("count", 0, SSRState.Codec.int)
44

@@ -9,15 +9,15 @@ let make = () => {
99
<button
1010
class="px-3 py-1 rounded bg-slate-900 text-white hover:bg-slate-700" onClick={decrement}
1111
>
12-
{View.text("-")}
12+
{"-"}
1313
</button>
1414
<span class="font-mono text-xl tabular-nums">
15-
{View.signalText(() => Signal.get(count)->Int.toString)}
15+
{Signal.get(count)}
1616
</span>
1717
<button
1818
class="px-3 py-1 rounded bg-slate-900 text-white hover:bg-slate-700" onClick={increment}
1919
>
20-
{View.text("+")}
20+
{"+"}
2121
</button>
2222
</div>
2323
}

‎templates/rescript-template-xote-ssr/src/Page.res‎

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,38 @@
1-
@jsx.component
1+
@xote.component
22
let make = () => {
33
<main class="min-h-screen bg-slate-50 text-slate-900 flex items-center justify-center p-6">
44
<div
55
class="max-w-2xl w-full bg-white rounded-2xl shadow-sm border border-slate-200 p-8 space-y-8"
66
>
77
<header class="space-y-2">
88
<p class="text-xs uppercase tracking-widest text-slate-500">
9-
{View.text("xote · ssr template")}
9+
{"xote · ssr template"}
1010
</p>
11-
<h1 class="text-3xl font-semibold"> {View.text("Welcome to xote")} </h1>
11+
<h1 class="text-3xl font-semibold"> {"Welcome to xote"} </h1>
1212
<p class="text-slate-600">
13-
{View.text(
14-
"A clean slate for building reactive UIs in ReScript, rendered on the server and hydrated on the client.",
15-
)}
13+
{"A clean slate for building reactive UIs in ReScript, rendered on the server and hydrated on the client."}
1614
</p>
1715
</header>
1816
<section class="space-y-2">
19-
<h2 class="text-sm font-medium text-slate-700"> {View.text("Tech stack")} </h2>
17+
<h2 class="text-sm font-medium text-slate-700"> {"Tech stack"} </h2>
2018
<ul class="text-sm text-slate-600 space-y-1 list-disc pl-5">
21-
<li> {View.text("ReScript v12 — typed language compiling to clean JavaScript")} </li>
22-
<li> {View.text("xote — fine-grained reactivity with SSR + hydration")} </li>
23-
<li> {View.text("Vite 7 — dev server (middleware mode) and bundler")} </li>
24-
<li> {View.text("Tailwind CSS v4 — utility-first, CSS-first config")} </li>
19+
<li> {"ReScript v12 — typed language compiling to clean JavaScript"} </li>
20+
<li> {"xote — fine-grained reactivity with SSR + hydration"} </li>
21+
<li> {"Vite 7 — dev server (middleware mode) and bundler"} </li>
22+
<li> {"Tailwind CSS v4 — utility-first, CSS-first config"} </li>
2523
</ul>
2624
</section>
2725
<section class="space-y-2">
28-
<h2 class="text-sm font-medium text-slate-700"> {View.text("Reactive counter demo")} </h2>
26+
<h2 class="text-sm font-medium text-slate-700"> {"Reactive counter demo"} </h2>
2927
<div class="border border-slate-200 rounded-lg">
3028
<Counter />
3129
</div>
3230
<p class="text-xs text-slate-500">
33-
{View.text("State is rendered on the server and survives hydration via SSRState.")}
31+
{"State is rendered on the server and survives hydration via SSRState."}
3432
</p>
3533
</section>
3634
<footer class="text-xs text-slate-500">
37-
{View.text("Edit src/Page.res and src/Counter.res to start building.")}
35+
{"Edit src/Page.res and src/Counter.res to start building."}
3836
</footer>
3937
</div>
4038
</main>

0 commit comments

Comments
 (0)