Fork me on GitHub
#shadow-cljs
<
2022-01-18
>
cjsauer22:01:01

Can I set JVM system properties from the command line with shadow?

cjsauer22:01:13

Something like this:

npx shadow-cljs clj-repl --config-merge '{:jvm-opts ["-Duser.home=blah"]}'

cjsauer22:01:27

That doesn’t seem to be sticking tho

berkeleytrue23:01:15

In a shadow-cljs project, when my cljs dependency has npm depencies (macchiato has a :npm key in project.clj and a package.json) how do I get shadow to install those npm modules? Do I have to manually install them in my projects package json?

thheller06:01:44

in general project.clj is not part of a distributed package. it is only used to generate pom.xml which actually drives the maven distribution. so the :npm key does absolutely nothing since it is not transfered to pom.xml

thheller06:01:21

CLJS packages can include a deps.cljs file with {:npm-deps {"foo" "1.2.3"}} which would make shadow-cljs run npm install [email protected] on compile

thheller06:01:30

if the package does not include that file then shadow-cljs doesn't have any info on missing npm packages and can't install them

berkeleytrue17:01:01

@U05224H0W thanks for the info! I ended up just coping the npm deps manually.