This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-09
Channels
- # adventofcode (93)
- # announcements (11)
- # babashka (7)
- # babashka-sci-dev (17)
- # beginners (73)
- # biff (7)
- # calva (3)
- # cider (1)
- # clj-kondo (160)
- # clj-together (12)
- # clojure (44)
- # clojure-art (2)
- # clojure-europe (12)
- # clojure-losangeles (1)
- # clojure-nl (3)
- # clojure-norway (22)
- # clojure-uk (2)
- # clojurescript (8)
- # clr (1)
- # cursive (6)
- # data-science (1)
- # datomic (1)
- # emacs (6)
- # events (1)
- # exercism (1)
- # fulcro (6)
- # graphql (2)
- # introduce-yourself (1)
- # lsp (18)
- # nrepl (7)
- # off-topic (45)
- # polylith (25)
- # portal (25)
- # practicalli (3)
- # re-frame (14)
- # reagent (28)
- # reitit (2)
- # releases (2)
- # shadow-cljs (73)
- # sql (11)
- # tools-deps (12)
- # transit (4)
- # xtdb (4)
hey folks, I’m trying to integrate portal into my existing project
I created the following alias in my deps.edn
:portal {:extra-deps {cider/cider-nrepl {:mvn/version "0.28.5"}
djblue/portal {:mvn/version "0.35.0"}}
:main-opts ["-m" "nrepl.cmdline"
"--middleware" "[portal.nrepl/wrap-portal cider.nrepl/cider-middleware]"
"-e" "(require '[portal.api :as p]) (def p (p/open))"]}
sadly the ui won’t autoload, but if i put the code after the “-e” in the repl that opens it opens portal
Hi, I was hoping to find a way that when I do a jack in via cider I could automatically pass the code necessary to start the portal web Ui
But found out nrepl has no -e
So I guess I’ll go with the sample code in the documentation to send the code to eval via emacs
I think you can move the -e before the -m to get clojure to eval the code before invoking the main fn
That‘d be cool! I saw this a couple of times and was wondering about the order. will try it out when I return to the computer! Thx a bunch!
wohoo! it worked, thx!
To explain why: once you have a -m
option, everything after that is considered as command-line arguments to the -main
function in that namespace -- whereas -e
is an argument to the Clojure CLI itself (well, to clojure.main
), so -m
has to come after -e
.
I see, makes a lot of sense. Couldn’t find a lot of info about it in the docs, but thanks to you and @U1G869VNV I now know a little more 😅
any hints on what I’m doing wrong?