From d449a051b6ce4b8a1f51a008b76485de85741291 Mon Sep 17 00:00:00 2001 From: Christian Weilbach Date: Thu, 8 Feb 2024 16:31:56 -0800 Subject: [PATCH 1/2] Start working on cljs support again. --- deps.edn | 4 +++- src/datahike/store.cljc | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/deps.edn b/deps.edn index 8b21c24d3..cec3ffb85 100644 --- a/deps.edn +++ b/deps.edn @@ -32,7 +32,9 @@ :1.10 {:override-deps {org.clojure/clojure {:mvn/version "1.10.0"}}} - :cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.11.121"}}} + :cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.11.132"} + thheller/shadow-cljs {:mvn/version "2.27.2"} + binaryage/devtools {:mvn/version "1.0.7"}}} :dev {:extra-paths ["dev" "benchmark/src"] :extra-deps {org.clojure/tools.namespace {:mvn/version "1.4.4"} diff --git a/src/datahike/store.cljc b/src/datahike/store.cljc index 573c8d6c2..eddd44e6a 100644 --- a/src/datahike/store.cljc +++ b/src/datahike/store.cljc @@ -1,6 +1,7 @@ (ns ^:no-doc datahike.store (:require [clojure.spec.alpha :as s] - [konserve.filestore :as fs] + [#?(:clj konserve.filestore + :cljs konserve.node-filestore) :as fs] [konserve.memory :as mem] [environ.core :refer [env]] [datahike.index :as di] From e59430f8d250584b74b2df9e818bbe2b8cca75bf Mon Sep 17 00:00:00 2001 From: Christian Weilbach Date: Thu, 8 Feb 2024 16:36:13 -0800 Subject: [PATCH 2/2] Add shadow-cljs. --- shadow-cljs.edn | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 shadow-cljs.edn diff --git a/shadow-cljs.edn b/shadow-cljs.edn new file mode 100644 index 000000000..b6337b04d --- /dev/null +++ b/shadow-cljs.edn @@ -0,0 +1,32 @@ +{:deps {:aliases [:cljs]} + :repl {:runtime-select :latest} + + :builds + {:app + {:target :browser + :output-dir "public/js" + :asset-path "/js" + :modules {:main {:entries [datahike.db]}}} + + + :browser-test + {:target :browser-test + :test-dir "resources/public/js/test" + :ns-regexp "datahike.test.lookup-refs-test" + :devtools {:http-port 8021 + :http-root "resources/public/js/test"}} + + :browser-module + {:target :browser + :output-dir "public/assets/app/js" + :asset-path "/assets/app/js" + :modules {:main {:init-fn db.compiled/run-query}}} + + :node-test + {:target :node-test + :output-to "out/node-tests.js" + :autorun true} + + :ci + {:target :karma + :output-to "target/ci.js"}}} \ No newline at end of file