Skip to content

Commit

Permalink
prep for public
Browse files Browse the repository at this point in the history
  • Loading branch information
nikonikoniko committed Nov 21, 2024
1 parent eaaa510 commit 565e01d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Testing inline hydration using RUM

This demo shows a very basic way of rendering static HTML with some
components being re-hydrated on the frontend.

## watch the browser js, to start js dev

static built files include this js

```
npm i
npx shadow-cljs watch browser
```

Expand All @@ -13,3 +19,9 @@ Currently you can build the pages only from the repl. no commands made yet
```
clj -M:repl
```

After connecting the editor, in `build.clj`, excecute

```clojure
(spit "./public/index.html" (rum/render-html (app/app "helloooo")))
```
2 changes: 1 addition & 1 deletion shadow-cljs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
:module-loader true

:modules
{:main {:init-fn sfdb.app/init}}}}}
{:main {:init-fn hydrationtest.app/init}}}}}
2 changes: 1 addition & 1 deletion src/sfdb/app.cljc → src/hydrationtest/app.cljc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns sfdb.app
(ns hydrationtest.app
(:require [rum.core :as rum :refer [defc reactive react]]
#?(:cljs [cljs.reader :as re :refer [read-string]])))

Expand Down
4 changes: 2 additions & 2 deletions src/sfdb/build.clj → src/hydrationtest/build.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns sfdb.build
(ns hydrationtest.build
(:require [rum.core :as rum]
[sfdb.app :as app]))
[hydrationtest.app :as app]))

(println "hello")

Expand Down
5 changes: 0 additions & 5 deletions src/sfdb/macros.clj

This file was deleted.

2 changes: 0 additions & 2 deletions src/sfdb/macros.cljs

This file was deleted.

0 comments on commit 565e01d

Please sign in to comment.