Fork me on GitHub
#nbb
<
2022-07-16
>
borkdude15:07:02

Aaah,

$ node ../nbb/lib/nbb_main.js -cp $(clojure -Spath) -e "(require '[malli.core :as m]) (m/validate [:vector int?] [1 2 3 :foo])"
false

👀 1
borkdude19:07:30

Malli should work from source now, as follows:

$ cat package.json
{
  "dependencies": {
    "nbb": "^0.6.129"
  }
}

 $ cat deps.edn
{:deps {metosin/malli {:git/url ""
                       :git/sha "e400bbcdab09b21dc42d82f90400f60f85af6bd9"}
        borkdude/dynaload {:git/url ""
                           :git/sha "71eb9281dd8716b48995fe69845753575fc25c39"}}}

$ node node_modules/.bin/nbb -cp $(clojure -Spath) -e "(require '[malli.core :as m]) (m/validate [:int] 1)"
true

😎 5
nbb 2
babashka 1
❤️ 2
borkdude19:07:46

And bundling also works with this dependency:

/tmp $ node malli.mjs
true
See bundle docs: https://github.com/babashka/nbb/tree/main/doc/bundle cc @U08ALHZ2N

littleli09:07:12

This is a fantastic news.

johanmynhardt10:07:53

This is wonderful! Thank you 😎