Hi there! please hint how to use devcards from figwheel.main?
- fw.main setup working
- in xxx.core.cljs
required devcards, start-devcard-ui!
- {:main xxx.core :figwheel {:devcards true}}
in dev.cljs.edn
not sure about this?
=> I see the devcards UI, but not my card's ns
@fsderr I'm going to be making it easy to integrate devcards in the near future
but untill then you would need do your second choice "in xxx.core.cljs
required devcards, start-devcard-ui!
"
@fdserr i think you have to require all of the namespaces that you use defcard
in the namespace that you call start-devcard-ui!
(ns cards.core
(:require [devcards.core :as dc]
[cards.document-cards]
[cards.allergies-cards]
[cards.claims.payment-reconciliation]
[cards.problem-list-cards]
[cards.examinations-physical]
[cards.review-of-systems]
[cards.claims.careteam]
[cards.tasks-cards])
(:require-macros
[devcards.core :refer [defcard]]))
(dc/start-devcard-ui!)
@bhauman yeah, saw your kanban, canโt be thankful enough for your hard work ๐ any idea/pointer as why it wouldnโt work with my setup? does fw.main catch the โdevcards trueโ entry in build conf?
@dpsutton thanks Dan, I only have one ns so far.
@fdserr it will be easiest if you have a seperate build config cards.cljs.edn that :main cards.core
in it
and a separate cards.html file that loads it
@fdserr ^
@bhauman I'm kinda doing that: https://gitlab.com/fdserr/de2e.clj I suspect the devcards flag is not being picked up. Can you please give me a pointer into either fw or dc code, I might be able to get it straightened? Can't live with no cards lol, so no rush I'm back to lein meanwhile^
I can't see that link
now?
@fdserr the figwheel key doesn't work at all in figwheel-main
@fdserr the defcard has to be before the call to start-ui
also :refer shouldn't work like that
unless things have changed you I thought you couldn't :refer to macros like that
I thought you could only do that in (:require-macros
@bhauman :include-macros + :refer works most of the time, but some quirks
thanks x1000 for the hint, gonna try and report ๐
cool!
(ns de2e.core
(:require
[devcards.core
:refer [start-devcard-ui!]])
(:require-macros
[devcards.core
:refer [defcard deftest]]))
(enable-console-print!)
(defcard "Welcome!")
(start-devcard-ui!)
=> devcards awesomeness!!!
@bhauman president!awesome
Thank you Bruce, merry coding!
@bhauman awh ๐ I refreshed :3449/cards.html from lein project, you bet it worked. :9500/ from figwheel.main setup still not showing my ns... Not a blocker, take it easy, run for president anyway ๐
@fdserr start-devcard-ui! is a macro
(devcards.core/start-devcard-ui!*)
is a function
(ns de2e.core
(:require-macros
[devcards.core
:refer [defcard deftest start-devcard-ui!]]))
(enable-console-print!)
(defcard "Welcome!")
(start-devcard-ui!)
=> no dc ui(ns de2e.core
(:require
[devcards.core
:refer [start-devcard-ui!*]])
(:require-macros
[devcards.core
:refer [defcard deftest]]))
(enable-console-print!)
(defcard "Welcome!")
(start-devcard-ui!*)
=> sweetnesswell thats weird
but I'm glad you got it working
no star => sweetness as well?!?! how come the compiler don't scream 8-0
not showing my ns yet lol. never mind, let's give it some hammock^
just to annoy you^:
(ns de2e.core
(:require
[devcards.core
:refer [start-devcard-ui!]])
(:require-macros
[devcards.core
:refer [defcard deftest]]))
(enable-console-print!)
(defcard "Welcome!")
(start-devcard-ui!)
=> shows dc ui (not the card tho)
Again, not a big deal, dc very much alright with lein.
Talk to you soon! ๐@fdserr I'd be sure to put the cards in a different ns than the start devcard ui
that may be the problem
Oh. Will deffo try this alchemy ๐