Fork me on GitHub
#shadow-cljs
<
2020-06-03
>
Eliraz07:06:17

npm install && npx shadow-cljs watch :devcards

thheller07:06:50

@eliraz.kedmi the mistake you have is :devcards true in your build config. that should be :compiler-options {:devcards true}

thheller07:06:36

and then

(defn hello-component []
  [:div "hello-world"])

(defcard hello
  (dv/reagent hello-component)
  {:inspect-data true
   :frame true
   :history true})

thheller07:06:43

instead of (dv/reagent hello)

thheller07:06:50

then everything shows up as expected

Eliraz07:06:42

wow it works! thank you!

👍 4
thheller21:06:31

small teaser for an addition coming in the next release. might be useful for :preload authors (eg. re-frame-10x, fulcro-inspect)

❤️ 24
📣 4
✔️ 4
awb9901:06:29

I love this feature! But this will not work with production bundles I assume; as this would require shadow-cljs to ship a self-hosted compiler. Or will it? Similar to what SCI can do today?

thheller06:06:54

no you are correct. this only works while the watch is running. talks directly to the shadow-cljs process precisely so it doesn't need any of the self-hosted things.

tony.kay20:06:22

@U0CSAHDV0, this is interesting for the tooling you’ve been playing with.

thheller20:06:01

it is released in 2.10.0 and should be available in all builds automatically as long as watch is running. I'll document this a bit more soon.

👍 4
thheller21:06:03

or anyone wanting to eval cljs code in the browser console 😉