This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-05
Channels
- # adventofcode (50)
- # announcements (1)
- # asami (29)
- # babashka (56)
- # beginners (19)
- # calva (62)
- # cider (12)
- # cljs-dev (1)
- # clojure (42)
- # clojure-europe (214)
- # clojure-france (4)
- # clojure-italy (1)
- # clojurescript (58)
- # community-development (4)
- # cryogen (6)
- # cursive (7)
- # data-science (1)
- # events (3)
- # figwheel-main (1)
- # fulcro (21)
- # lambdaisland (3)
- # malli (17)
- # mid-cities-meetup (1)
- # off-topic (38)
- # pathom (3)
- # reagent (7)
- # reclojure (1)
- # reveal (15)
- # rewrite-clj (11)
- # shadow-cljs (30)
- # sql (21)
- # test-check (14)
- # tools-deps (1)
- # vim (21)
- # xtdb (5)
is there way to tell shadow to output exports using export ...
format instead of Object.defineProperty(module.exports, ...)
?
using :npm-module
target
can I use shadow-cljs to create an "uberjar" like node bundle? I want to compile something on one platform and transfer a single file or small archive to the target platform and have node it without any dependency issues
note to self: first try to read documentation: https://shadow-cljs.github.io/docs/UsersGuide.html#target-node-script
you can use something like https://github.com/vercel/ncc to make it fully self contained
oh sorry: node is on the target platform, but that's it. I don't need a single file executable, a single file script is enough for my usecase (arm7l system)
but if you add any npm dependencies it'll either require the node_modules
folder wherever you are running or post-processing a release build with ncc
I'm trying to integrate flow-storm-debugger in my development workflow with shadow. It requires that you first call the flow-storm-debugger.main/-main and then connect using flow-storm-api/connect. I originally added a preload of a .cljs file but it needs to run the debugger in a clj context. Is there a way to execute that debugger.main namespace as part of my build?
I'm not using this workflow, would I need to switch? https://shadow-cljs.github.io/docs/UsersGuide.html#clj-run
It's a debugger that I can connect to, but it requires a startup beforehand in clojure, and connecting to it when the app loads
Basically I want to run it beforehand, but I'm clojure, and then connect using a preload
right, I want it integrated into the build, so trying with the clj-run option
That seemed to do it
I was hoping there was a way to have preloads run clj files to execute so I could just do cider jack in from cider
Hello! I just started using shadow-cljs (I used leiningen only)
{:source-paths ["src" "test"]
:dependencies [[com.taoensso/timbre "4.10.0"]
[macchiato/core "0.2.16"]]
:builds {:app {:devtools {:repl-init-ns backend.core
:repl-pprint true}
:main backend.core/server
:target :node-script
:source-map true
:exports {:server backend.core/server}
:output-dir "target"
:output-to "target/main.js"
:compiler-options {:optimizations :simple}}}
:nrepl {:init-ns backend.core}}
^ My edn file looks like this but where do I put development dependencies. Canβt see example from the official doc. I want to include [binaryage/devtools "1.0.2"]
:profiles {:dev {:source-paths ["dev"]
:repl-options {:init-ns user}
:dependencies [[midje "1.9.9"]
[ring/ring-mock "0.4.0"]]
:aliases {"test-ancient" "midje"
"upgrade-deps" ["ancient" "upgrade" ":all" ":check-clojure"]}
:bikeshed {:max-line-length 120
:docstrings false}}
^ Would using dev profile work? (This is from my leiningen project.clj
)@thheller Thank you. Just to clarify, do you mean I include it in :dependencies (top level)?
@wontheone1 yes. it won't have any negative impacts.
Aha thank you. I guess some dead code elimination π makes sense