Skip to content

Commit 3b89de8

Browse files
Add core.match fails w/ "Unable to resolve var"
1 parent b7897f8 commit 3b89de8

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

bb.edn

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
;; nbb comes with cljs-bean but not cljs-bean.transit
2626
cljs-bean-transit/deps {:local/root "features/cljs-bean-transit"}
2727
rewrite-clj/deps {:local/root "features/rewrite-clj"}
28-
ordered/deps {:local/root "features/ordered"}}
28+
ordered/deps {:local/root "features/ordered"}
29+
core-match/deps {:local/root "features/core.match"}}
2930

3031
:tasks
3132
{:requires ([babashka.fs :as fs]

features/core.match/deps.edn

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{:deps
2+
{org.clojure/core.match {:mvn/version "1.1.0"}}}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
(ns nbb.impl.core-match
2+
{:no-doc true}
3+
(:require [cljs.core.match :as match]
4+
[nbb.core :as nbb]
5+
[sci.core :as sci]))
6+
7+
(def core-ns (sci/create-ns 'cljs.core.match nil))
8+
(def core-namespace
9+
{'match (sci/copy-var match/match core-ns)})
10+
11+
(def config {:namespaces {'cljs.core.match core-namespace}})
12+
13+
(defn init []
14+
(nbb/register-plugin! ::core-match config))
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[{:name logseq/core.match
2+
:namespaces [cljs.core.match]
3+
:js "./nbb_core_match.js"
4+
:shadow-config
5+
{:modules
6+
{:nbb_core_match {:init-fn nbb.impl.core-match/init
7+
:depends-on #{:nbb_core}}}}}]

0 commit comments

Comments
 (0)