Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Quafadas committed Jul 18, 2024
1 parent 7f9e6a7 commit dd8107b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
27 changes: 26 additions & 1 deletion site/docs/_docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,29 @@ cs launch io.github.quafadas::sjsls:{{projectVersion}} -- \
--proxy-prefix-path /api \
--proxy-target-port 8080 \

```
```

## Static site, no build tool.

This would serve the static site build with the `docJar` tool.

```sh
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
```

***
You need to include this javascript script tag in the body html - otherwise no page refresh.

```
<script>
const sse = new EventSource("/refresh/v1/sse");
sse.addEventListener("message", (e) => {
const msg = JSON.parse(e.data);
if ("KeepAlive" in msg) console.log("KeepAlive");
if ("PageRefresh" in msg) location.reload();
});
</script>
```
***
7 changes: 7 additions & 0 deletions site/docs/sidebar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
index: index.md
subsection:
- page: config.md
- page: motivation.md
- page: bundler.md
- page: motivation.md
- page: deployment.md

0 comments on commit dd8107b

Please sign in to comment.