This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (9)
- # babashka (98)
- # beginners (53)
- # boot (2)
- # calva (19)
- # cider (58)
- # clj-kondo (4)
- # cljdoc (11)
- # clojure (49)
- # clojure-dev (12)
- # clojure-nl (3)
- # clojure-uk (4)
- # clojurescript (42)
- # core-async (6)
- # cursive (9)
- # data-science (1)
- # fulcro (23)
- # jobs-discuss (2)
- # nrepl (30)
- # off-topic (42)
- # pedestal (6)
- # re-frame (8)
- # reitit (7)
- # remote-jobs (2)
- # shadow-cljs (134)
- # specter (1)
- # vim (13)
I’m not positive if this is a CIDER or shadow-cljs question but I’ll try here:
I was having trouble evaluating in a spacemacs code window until I came across a stackoverflow article describing how (for
:target :node-script) I need to run
node from the command line and evaluate the compiled code. (I also had to run
npm install). This makes me feel like I’m missing some key documentation but I didn’t see anything about that here: https://shadow-cljs.github.io/docs/UsersGuide.html#target-node
Here’s the stackoverflow article that had the answer: https://stackoverflow.com/questions/58060822/how-to-connect-a-clojurescript-node-repl-to-my-node-library-shadow-cljs-project
Question: Is there more documentation that I need to read about how CIDER is launching
npx shadow-cljs that will mention things like “then go to the shell and manually run
node on the generated JS artifact”?
admittedly, I haven’t read that whole doc yet, but yes, it will help me understand the architecture. I’ll read that before asking more questions. I was hoping to find a “walk-through” type of thing that mentions all the required steps in a single place.
I think this is a key statement in 14.3: > Regular shadow-cljs builds do not manage any JS runtime of their own so you are responsible for running them.
can't write 50 different walkthroughs for all the possible things people may be doing 😛
In my head, there’s browser app and node.js app, but I know that’s oversimplified.
if you want to skip the manual "run" you use
shadow-cljs node-repl or
that’s the part that confused me, I would have thought that CIDER would have run
shadow-cljs node-repl based on
maybe when I figure this out I’ll try to write a node.js quickstart that gives all the steps. Then I’ll realize how much I’m missing.
rightly or wrongly, I think of CIDER as starting and connecting to any background processes required to evaluate code in the emacs buffer.
the stuff really isn't all that complicated in my head ... but granted that I work on this stuff for years I'm not the best to judge
can we take cider out of the equation for a second since I don't know what it does when it comes to "starting" things
warning, this is losing me because I have only a noobie understanding of how these pieces work…
CIDER runs this: `[nREPL] Starting server via /usr/local/bin/npx shadow-cljs -d nrepl:0.6.0 -d cider/piggieback:0.4.0 -d cider/cider-nrepl:0.22.0-SNAPSHOT server... `
alright. that may be the problem. does it even let you continue WITHOUT selecting a build? or is generic
browser-repl an option?
right. Then I have to go to the shell and run
node -e "require('./target/main.js')"
I was expecting to do something very “nominal” and see a brief description of the steps. I suppose I was wrong in the number of things I’ve integrated with and possible steps.