Fork me on GitHub
#figwheel-main
<
2019-01-17
>
cjohansen22:01:37

how do I configure devcards with figwheel-main?

cjohansen22:01:57

my cards don't seem to render

cjohansen22:01:17

with leiningen I use :devcards true, but it is unclear where to place this with fighweel-main

cjohansen22:01:43

I've done the equivalent of this:

cjohansen22:01:46

:extra-main-files {:tests    {:main hello-world.core-tests}
                   :devcards {:main hello-world.devcards}}

cjohansen22:01:11

and the result is:

cjohansen22:01:45

which both includes the default template, and fails to render the cards required from the ns being rendered

dpsutton22:01:48

^{:extra-main-files {:devcards {:main react-hitch.devcards-runner}
                     :test     {:main react-hitch.test-runner}}
  :watch-dirs       ["src" "test" "devcards"]}
{:main     react-hitch.qui-tracker
 :devcards true}

dpsutton22:01:24

it goes in the compiler options. the meta data is for figwheel but you need the compiler aware of devcards. You can see this in the devcards macro which will emit nothing without this compiler flag

cjohansen22:01:58

thought I tried that before, but I guess not 🤷

dpsutton22:01:58

the extra mains all use the same build but are just different entry points. so all builds will be devcards builds

dpsutton22:01:07

i stumbled around in this for a while too 🙂

cjohansen22:01:24

would be good to just put this explicitly in the figwheel-main docs and/or the devcards docs

dpsutton22:01:07

if you put together some doc that would help you out i'm sure bruce would accept a PR. He seems busier these days so if you get it down to a button click for him i'm sure it would be welcome

cjohansen22:01:00

yeah, I probably should