Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Oct 29, 2024
1 parent bee9ad8 commit 7fbd710
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion shadow-cljs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:dev-http {7778 {:roots ["public" "classpath:public"]}}
:nrepl false
:builds {:viewer {:target :esm
:runtime :browser ;; `:custom` needed when developing ssr, will see WebSocket errors without it
:runtime :custom #_:browser ;; `:custom` needed when developing ssr, will see WebSocket errors without it
:output-dir "public/js"
:release {:output-dir "build/"}
:compiler-options {:source-map true}
Expand Down
2 changes: 1 addition & 1 deletion src/nextjournal/clerk/sci_env.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
'clojure.repl {'pst pst-stub}}
(sci-copy-nss
'cljs.math
'cljs.repl
#_'cljs.repl
'nextjournal.clerk.parser
'nextjournal.clerk.render
'nextjournal.clerk.render.code
Expand Down
13 changes: 7 additions & 6 deletions ui_tests/ssr.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
Use this to iterate on it, then make sure the advanced bundle works
in Graal via `nextjournal.clerk.ssr`."
(:require ["./../public/js/viewer.js" :as viewer]
;; the above is the dev build, the one below the relase (generate it via `bb release:js`)
#_["./../build/viewer.js" :as viewer]
[babashka.cli :as cli]
[promesa.core :as p]
[nbb.core :refer [slurp]]))
(:require
["./../public/js/viewer.js?q=3" :as viewer]
;; the above is the dev build, the one below the relase (generate it via `bb release:js`)
#_["./../build/viewer.js" :as viewer]
[babashka.cli :as cli]
[promesa.core :as p]
[nbb.core :refer [slurp]]))

(defn -main [& args]
(p/let [{:keys [file edn url]} (:opts (cli/parse-args args {:alias {:u :url :f :file}}))
Expand Down
1 change: 1 addition & 0 deletions ui_tests/ssr.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "./../public/js/viewer.js";

0 comments on commit 7fbd710

Please sign in to comment.