This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-21
Channels
- # announcements (3)
- # babashka (98)
- # beginners (69)
- # chlorine-clover (6)
- # cider (24)
- # cljsrn (2)
- # clojure (97)
- # clojure-australia (2)
- # clojure-berlin (6)
- # clojure-dev (57)
- # clojure-dusseldorf (4)
- # clojure-europe (19)
- # clojure-italy (5)
- # clojure-nl (10)
- # clojure-seattle (1)
- # clojure-uk (44)
- # clojuredesign-podcast (13)
- # clojurescript (45)
- # cursive (4)
- # data-science (1)
- # datomic (32)
- # emacs (7)
- # events (5)
- # fulcro (17)
- # java (12)
- # jobs (1)
- # lumo (2)
- # malli (5)
- # observability (16)
- # off-topic (1)
- # pathom (3)
- # pedestal (4)
- # rdf (14)
- # re-frame (54)
- # reagent (4)
- # releases (3)
- # remote-jobs (1)
- # reveal (55)
- # shadow-cljs (34)
- # spacemacs (14)
- # specter (9)
- # tools-deps (16)
- # xtdb (7)
I am experimenting with build-hooks in shadow-cljs and I wondered why this fragment wont kick in when building a release:
(defn simple-user-test {:shadow.build/stages #{:configure :flush :compile-prepare}} [state args]
(println "HELLO:")
(println (with-out-str (pprint args)))
(println (:shadow.build/stage state)))
state)
but if I pass in a keyword, like :flush (instead of the set) it works fine…?I’m not really qualified to answer this, but in your example code snippet you seem to be missing the ^ marking the map as metadata?
and https://shadow-cljs.github.io/docs/UsersGuide.html#build-hooks does not involve any ^
my bad, apparently the defn macro allows for attaching metadata using a plain map. I didn’t realise that 🙂
This is what the docs say:
The hook is a just a normal Clojure function with some additional metadata. The {:shadow.build/stage :flush} metadata informs the compiler to call this hook for :flush only. You may instead configure {:shadow.build/stages #{:configure :flush}} if the hook should be called after multiple stages. At least one configured stage is required since the hook otherwise would never do anything.
@schpaencoder when using a set it is stages
not stage
Is there a way to get the shadow-cljs classpath from the command line? This is mentioned in https://github.com/thheller/shadow-cljs/issues/558, I'm just wondering what the best solution is to use clj-kondo, https://github.com/borkdude/clj-kondo#project-setup.
@thheller (or anyone else who might know) not long ago, you suggested I ignore that ‘builds’ page that pops up after a successful build.
Does that page have or will it have a useful purpose? Or is it just a relic or diagnostic tool?
@jmckitrick not a clue what you mean. what is "‘builds’ page that pops up after a successful build"?
I assume it’s shadow-cljs, but I could be wrong. a question pops up after CIDER starts the CLJS REPL and says Visit '
Some told me ‘just say no and ignore this’
that is a cider question. it isn't coming from shadow-cljs. not a clue what controls it.
ok, sorry…
@dpsutton if that supposed to open the actual user app? then it is opening the wrong URL maybe?
correct. i believe its usally spot on. when the port is 3000 it offers that port. been a bit but i wouldn't be surprised if this is maybe when deps are managed by lein or deps perhaps
i have 3000 listed as my port but that's occupied so shadow bumped up to 3001. i was correctly offered to see 3001