This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-19
Channels
- # announcements (3)
- # asami (3)
- # babashka (39)
- # beginners (65)
- # calva (13)
- # cider (4)
- # clj-kondo (69)
- # cljdoc (19)
- # cljs-dev (2)
- # clojure (90)
- # clojure-dev (10)
- # clojure-europe (61)
- # clojure-france (15)
- # clojure-nl (8)
- # clojure-uk (2)
- # clojurescript (28)
- # conjure (2)
- # core-logic (4)
- # cursive (8)
- # datalevin (5)
- # datascript (7)
- # datomic (14)
- # depstar (4)
- # events (1)
- # graphql (7)
- # holy-lambda (5)
- # jobs (5)
- # kaocha (1)
- # malli (14)
- # membrane-term (13)
- # missionary (13)
- # nextjournal (6)
- # off-topic (1)
- # polylith (15)
- # portal (10)
- # re-frame (35)
- # reitit (1)
- # remote-jobs (3)
- # schema (3)
- # sci (121)
- # spacemacs (6)
- # tools-build (8)
- # tools-deps (74)
- # xtdb (7)
I'm working on getting an easy automatic portal startup configuration for the rest of my team and I have something that pops up a portal instance with one problem: the def
and namespace alias aren't working. I'm able to tap>
values to it, but I'd like to try to resolve my issue before I consider it ready for public consumption. For context: this is going in ~/.lein/profiles.clj
{:user {:dependencies [[djblue/portal "0.18.0"]]
:injections [(require '[portal.api :as p])]
:repl-options {:welcome (do
(def p (portal.api/open))
(add-tap #'portal.api/submit))}}}
I've found that this combination of injections and repl-options seems to work. Is it a no-no to put a do
inside of the :welcome
block?
That seems reasonable to me @mschmele but I tend to use requiring-resolve
these days so I don't need a separate require
.
:repl-options {:welcome (do (def p ((requiring-resolve 'portal.api/open))) (add-tap (requiring-resolve 'portal.api/submit)))}
My Clover/VS Code customizations, with the code to start Portal inside VS Code, via a hotkey: https://github.com/seancorfield/vscode-clover-setup/blob/develop/config.cljs#L256-L281 (just for reference -- might give you more ideas).