This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-29
Channels
- # aleph (1)
- # announcements (5)
- # beginners (21)
- # cider (4)
- # clojars (1)
- # clojure (39)
- # clojure-europe (5)
- # clojure-norway (133)
- # clojurescript (5)
- # datomic (27)
- # exercism (2)
- # gratitude (4)
- # humbleui (21)
- # hyperfiddle (10)
- # integrant (16)
- # introduce-yourself (1)
- # lsp (17)
- # matrix (1)
- # nbb (10)
- # overtone (5)
- # polylith (21)
- # re-frame (6)
- # squint (3)
- # tools-deps (22)
- # yamlscript (102)
Hi, @borkdude - I think I already asked this question before, but is there a way to use nbb
as a ClojureScript library?
To explain a little bit better - I want to use SCI on a project, but I basically want to do the same thing that nbb
does - same configs, libraries, require support, etc, with some additional stuff. Is it possible, or it's best to just copy the core namespace and tinker with it?
I recommend to use sci.async instead of copy-ing nbb's core namespace (since it predates it) https://github.com/babashka/sci/blob/master/doc/async.md
What you could also do is use cherry to https://github.com/squint-cljs/cherry/blob/main/doc/embed.md it in a clojurescript project and then you can use js-await
Well, the sci.async
is one aspect right? I actually am more interested in already having all namespaces that nbb
have pre-configured, to have the js/
namespace wired, have the require
stuff find the right .cljs
files, etc
@U3Y18N0UC yes, sci.async was mostly design to make require
async (and secondary, to support top level await)
That already helps a lot, thanks! I don't really need the async stuff for now, everything will be pre-loaded anyway
also check out sci.configs: pre-made configurations to plug in, like for promesa, reagent, etc https://github.com/babashka/sci.configs