Fork me on GitHub
#clojurescript
<
2022-07-02
>
jeongsoolee0907:07:58

I’m trying to make a CLI app with node.js with ClojureScript. The Leiningen templates I have tried are all outdated, so I’ve experienced some hiccups coming from the Clojure version being old (therefore leading to some weird errors like failing to macroexpand). Now I’m trying to use figwheel-new-template and modify the project.clj to set the compile target to node. What parts should I tweak and how?

valtteri09:07:57

For simplest possible node scripting I recommend looking into https://github.com/babashka/nbb

jeongsoolee0913:07:27

@U6N4HSMFW Hmm.. even though it's installed on my macbook, didn't know nbb supported npm-installed packages. I'll look into it. Thanks!

schadocalex19:07:25

I use shadow cljs in which you can target node js (and import npm packages natively) https://shadow-cljs.github.io/docs/UsersGuide.html#target-node

👍 1
borkdude13:07:43

@U01LJQRJ2AU Yes, nbb supports all node packages :)

👀 1
💯 1