Fork me on GitHub
#clojurescript
<
2021-02-27
>
Takis_20:02:45

hello what build tool to use for Clojurescript nodejs?i am new i used lein-cljsbuild , i want to pack my clojurescript project as npm(so nodejs code can use it) , and use npm dependancies

Takis_20:02:36

good thank you , i was about to read that,i just wasnt sure

Takis_20:02:58

if shadow is good for node also

p-himik20:02:47

I haven't tried it myself but that particular use case seems to be well documented at the very least.

Takis_20:02:00

thank you : )

👍 3
cassiel20:02:49

I have a figwheel-main setup for targetting nodejs, but shadow looks like a more serious build tool. Any concrete pros/cons one way or the other?

Takis_20:02:49

i am new i cant help really, but i heard that people like shadow-cljs, and by searching online i saw that shadow-cljs is good with npm , but i cant compare tools

p-himik21:02:58

People use both. A few years ago I made a switch from figwheel to shadow-cljs back when it had the best support for NPM modules. I've seen people say that nowadays figwheel-main supports NPM modules just as well but I cannot vouch for that in any way.

cassiel21:02:10

I’ve not yet got Figwheel set up so that it can crank out a production build rather than an NREPL-equipped dev environment - everything I’ve been doing is essentially live-coded dev. Maybe I’ll look into shadow for addressing that.

teodorlu20:02:56

Beginner question. Is it possible to set javascript object properties by providing the property name as a string? Not: (set! (.-age person) 81), but something like (assoc person "age" 81)? I'm aware of https://cljs.info/cheatsheet/, curious if it's possible without pulling in a dependency.

teodorlu21:02:03

In javascript, i'd do person["age"] = 81.

teodorlu21:02:00

goog.object.set looks promising.

👍 6
teodorlu21:02:45

goog.object.set was what I needed. 🦆