File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed
Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff 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:\t emp\l ive-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+ ***
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments