Skip to content

Commit

Permalink
cljs-service: add-cljs-kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Apr 18, 2024
1 parent 59c229c commit b57d434
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 37 deletions.
2 changes: 1 addition & 1 deletion demo/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"resources"
"target/webly"]
:deps {org.pinkgorilla/goldly {:local/root ".." :deps/manifest :deps}
org.pinkgorilla/webly {:mvn/version "0.5.673"}
org.pinkgorilla/webly {:mvn/version "0.5.676"}
org.pinkgorilla/ui-repl {:mvn/version "0.1.104"}
org.pinkgorilla/ui-site {:mvn/version "0.0.30"}
org.pinkgorilla/ui-binaryclock {:mvn/version "0.2.19"}
Expand Down
5 changes: 0 additions & 5 deletions demo/resources/ext/init.edn

This file was deleted.

10 changes: 3 additions & 7 deletions demo/resources/ext/pages.edn
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
'demo.page.sci-compile {'sci-compile-page demo.page.sci-compile/sci-compile-page}
'demo.page.lazy {'lazy-page demo.page.lazy/lazy-page}
'demo.page.error {'error-page demo.page.error/error-page}
'demo.page.kernel {'kernel-page demo.page.kernel/kernel-page}
}

'demo.page.kernel {'kernel-page demo.page.kernel/kernel-page}}
; runtime
:cljs-routes {"viewer" reval.page.viewer/viewer-page
"repl" reval.page.repl/repl-page
"" demo.page.main/main-page
Expand All @@ -21,7 +20,4 @@
"kernel" demo.page.kernel/kernel-page
"error" demo.page.error/error-page}

:sci-cljs-ns [demo.cljs-libs.helper
]

}
:sci-cljs-ns [demo.cljs-libs.helper]}
3 changes: 1 addition & 2 deletions demo/resources/test-config.edn
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{:build {:disabled-extensions #{"goog.string" "clojure.walk" "clojure.string" "goog.object"}}

:spa {:title "Goldly Demo"
:start-user-app [:goldly/init]}
:spa {:title "Goldly Demo"}

:reval {:rdocument {:storage-root "target/webly/public/rdocument/"
:url-root "/api/rdocument/file/"}
Expand Down
20 changes: 0 additions & 20 deletions demo/src/demo/cljs_libs/init.cljs

This file was deleted.

6 changes: 4 additions & 2 deletions reval-sci/resources/ext/reval-sci.edn
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
:depends-on #{:ui-codemirror :reval-ui :ui-repl :goldly-sci}
:cljs-namespace [reval.type.sci ; side-effects; load protocols for cljs and sci
reval.kernel.cljs-sci ; side-effects multi-method
]
:cljs-ns-bindings {'reval.kernel.cljs-sci {'eval-cljs reval.kernel.cljs-sci/eval-cljs}}
reval.init]
:cljs-ns-bindings {'reval.kernel.cljs-sci {'eval-cljs reval.kernel.cljs-sci/eval-cljs}
'reval.init {'reval-cljs-kernel-init reval.init/reval-cljs-kernel-init}}
:cljs-service {:start-fn reval.init/reval-cljs-kernel-init}
;
}
10 changes: 10 additions & 0 deletions reval-sci/src/reval/init.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(ns reval.init
(:require
[taoensso.timbre :as timbre :refer [info warn]]
[webly.module.build :refer [load-namespace]]))

(defn reval-cljs-kernel-init []
(info "goldly reval cljs-kernel-init ..")
(load-namespace 'reval.kernel.protocol)
(load-namespace 'reval.kernel.cljs-sci)
nil)

0 comments on commit b57d434

Please sign in to comment.