Fork me on GitHub
#figwheel-main
<
2018-10-30
>
dpsutton01:10:09

^{: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}
@rgm

dpsutton01:10:07

things to be wary about: need things on both classpath and watch dirs. typical bruce fashion there are extremely helpful and guiding error messages. Don't forget the devcards true in the cljs compiler options otherwise devcards compile to no-ops

dpsutton01:10:12

it's easy to see the output extra main files and make some files that point at them although bruce was incredibly nice and made autogenerated routes for them as well at figwheel-extra-mains/route. This isn't suitable for devcards though as the devcard UI and the figwheel UI clash

aisamu12:10:15

We had it "working" in the provided extra-mains page with:

(. (js/document.getElementById "app-devcards") remove)

(devcards.core/start-devcard-ui!)

dpsutton01:10:52

happy to share our devcards or test runner but they are bog standard, calling start-ui or the test infrastructure

rgm01:10:25

@dpsutton facepalm it was the :devcards true

rgm01:10:34

working now … thanks a ton

👍 4
dpsutton01:10:33

its the only way to work 🙂

rgm01:10:11

ok, dang, that is slick

rgm01:10:30

in case anyone else needs it, here’s a nearly-minimal patch to add devcards in a figwheel-driven tools.deps project https://github.com/rgm/reframe-template/commit/c149aae556caa2dcd2f720d451205810448dcced

👍 4