Skip to content

Commit dd8107b

Browse files
committed
.
1 parent 7f9e6a7 commit dd8107b

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

site/docs/_docs/config.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,29 @@ cs launch io.github.quafadas::sjsls:{{projectVersion}} -- \
143143
--proxy-prefix-path /api \
144144
--proxy-target-port 8080 \
145145

146-
```
146+
```
147+
148+
## Static site, no build tool.
149+
150+
This would serve the static site build with the `docJar` tool.
151+
152+
```sh
153+
C:\temp\live-server-scala-cli-js> cs launch io.github.quafadas::sjsls:0.2.0 -- --path-to-index-html C:\\temp\\live-server-scala-cli-js\\out\\site\\live.dest\\site --build-tool none --browse-on-open-at /docs/index.html
154+
```
155+
156+
***
157+
You need to include this javascript script tag in the body html - otherwise no page refresh.
158+
159+
```
160+
<script>
161+
const sse = new EventSource("/refresh/v1/sse");
162+
sse.addEventListener("message", (e) => {
163+
const msg = JSON.parse(e.data);
164+
165+
if ("KeepAlive" in msg) console.log("KeepAlive");
166+
167+
if ("PageRefresh" in msg) location.reload();
168+
});
169+
</script>
170+
```
171+
***

site/docs/sidebar.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
index: index.md
2+
subsection:
3+
- page: config.md
4+
- page: motivation.md
5+
- page: bundler.md
6+
- page: motivation.md
7+
- page: deployment.md

0 commit comments

Comments
 (0)