From 14104519fabe3aa3c3efeb1403561f105a968050 Mon Sep 17 00:00:00 2001 From: awb99 Date: Wed, 3 Apr 2024 20:21:33 -0500 Subject: [PATCH] webly.spa.resolve --- demo-webly/deps.edn | 15 +++++++++------ spa/deps.edn | 2 +- spa/resources/ext/webly-spa.edn | 6 ++++-- spa/src/webly/spa/resolve.cljs | 14 ++++++++++++++ 4 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 spa/src/webly/spa/resolve.cljs diff --git a/demo-webly/deps.edn b/demo-webly/deps.edn index b71af00..97ad433 100644 --- a/demo-webly/deps.edn +++ b/demo-webly/deps.edn @@ -3,8 +3,8 @@ "resources"] :deps {org.pinkgorilla/webly {:local/root "../webly" :deps/manifest :deps} ; lazy ui modules: - org.pinkgorilla/ui-highcharts {:mvn/version "0.0.27"} - org.pinkgorilla/ui-vega {:mvn/version "0.0.31"} + org.pinkgorilla/ui-highcharts {:mvn/version "0.0.28"} + org.pinkgorilla/ui-vega {:mvn/version "0.2.216"} org.pinkgorilla/ui-tailwind {:mvn/version "0.0.5"} org.pinkgorilla/oauth2 {:mvn/version "0.0.25"} } @@ -13,7 +13,7 @@ "resources" "test" "test/resources"] - :extra-deps {org.pinkgorilla/ui-repl {:mvn/version "0.0.74"} ; http cors test + :extra-deps {org.pinkgorilla/ui-repl {:mvn/version "0.1.93"} ; http cors test io.github.cognitect-labs/test-runner {:git/url "https://github.com/cognitect-labs/test-runner.git" :sha "cc75980b43011773162b485f46f939dc5fba91e4"} @@ -28,7 +28,7 @@ ; 2. run unit tests ; BUILD BUNDLE (then exit) - :webly {:extra-deps {org.pinkgorilla/ui-repl {:mvn/version "0.1.92"} ; http cors test + :webly {:extra-deps {org.pinkgorilla/ui-repl {:mvn/version "0.1.93"} ; http cors test } :extra-paths ["src" "resources" "test" "test/resources"] :exec-fn webly.app.app/webly-build @@ -66,9 +66,12 @@ :jetty {:exec-args {:profile "jetty"}} :watch {:exec-args {:profile "watch2"}} - :demo-build {:extra-deps {org.pinkgorilla/ui-highcharts {:mvn/version "0.0.26"} - org.pinkgorilla/ui-vega {:mvn/version "0.0.31"}} + :demo-build {:extra-deps {org.pinkgorilla/ui-highcharts {:mvn/version "0.0.28"} + org.pinkgorilla/ui-vega {:mvn/version "0.2.216"}} :exec-fn demo.test/test} ; }} + + + diff --git a/spa/deps.edn b/spa/deps.edn index 9ba2d93..d4017a2 100644 --- a/spa/deps.edn +++ b/spa/deps.edn @@ -22,7 +22,7 @@ org.pinkgorilla/ui-tailwind {:mvn/version "0.0.5"} org.pinkgorilla/ui-bidi {:mvn/version "0.0.29"} org.pinkgorilla/ui-dialog-keybindings {:mvn/version "0.1.6"} - org.pinkgorilla/css-theme {:mvn/version "0.1.4"} + org.pinkgorilla/css-theme {:mvn/version "0.1.5"} }} diff --git a/spa/resources/ext/webly-spa.edn b/spa/resources/ext/webly-spa.edn index 7eac453..9847d5d 100644 --- a/spa/resources/ext/webly-spa.edn +++ b/spa/resources/ext/webly-spa.edn @@ -1,4 +1,6 @@ {:name "webly-spa" :lazy false - :cljs-namespace [webly.spa] -} \ No newline at end of file + :cljs-namespace [webly.spa + webly.spa.resolve] + :cljs-ns-bindings {'webly.spa.resolve {'get-resolver webly.spa.resolve/get-resolver + 'set-resolver! webly.spa.resolve/set-resolver!}}} \ No newline at end of file diff --git a/spa/src/webly/spa/resolve.cljs b/spa/src/webly/spa/resolve.cljs new file mode 100644 index 0000000..ad77071 --- /dev/null +++ b/spa/src/webly/spa/resolve.cljs @@ -0,0 +1,14 @@ +(ns webly.spa.resolve + (:require + [webly.module.build :refer [webly-resolve]])) + + +(def resolver-a (atom webly-resolve)) + + +(defn set-resolver! [resolver-fn] + (reset! resolver-a resolver-fn)) + +(defn get-resolver [] + @resolver-a) +