This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-09-08
Channels
- # admin-announcements (42)
- # clara (8)
- # cljs-dev (2)
- # clojure (132)
- # clojure-argentina (4)
- # clojure-berlin (3)
- # clojure-brasil (3)
- # clojure-dev (8)
- # clojure-france (2)
- # clojure-hamburg (2)
- # clojure-india (1)
- # clojure-italy (4)
- # clojure-nl (1)
- # clojure-russia (31)
- # clojure-spain (1)
- # clojurescript (154)
- # core-async (19)
- # datomic (16)
- # devcards (43)
- # funcool (3)
- # hoplon (4)
- # immutant (8)
- # jobs (4)
- # ldnclj (71)
- # off-topic (1)
- # om (4)
- # onyx (30)
- # re-frame (3)
- # reagent (6)
- # remote-jobs (2)
- # ring (2)
I’m trying to integrate devcarsd into my existing project, it looks like I’m missing something, the devcards UI is not rendering, I tried to dig into sources a bit and I don’t understand who is responsible for calling start-devcard-ui! or start-ui
I see bunch of exported functions, is it supposed to be called by figwheel running in the same javascript context?
@darwin: I think I’m only one step ahead of you (trying to integrate into an existing project). I believe you are responsible for calling start-devcard-ui!
and the recommendation seems to be to have a cljsbuild
specifically for devcards
I’m at the point of getting the ui to show (when I call start-devcard-ui!
) but can’t get any cards to show up
@ericstewart: that’s what I did, I followed the docs, I think my problem is that for some reason figwheel is not present in my page
I have a feeling that figwheel is responsible for driving devcard’s UI, for added dynamism
I don’t think figwheel is required though
I’ve been following various docs and the template project: https://github.com/bhauman/devcards-template
hmm.. I see that it does have a start-devcard-ui call…. in devcards-core.cljs
when I call start-devcard-ui!
manually the UI gets rendered, but it is empty, it has no knowledge about my namespaces
in devcards-core.cljs, which calls (devcards.core/start-devcard-ui!)
it requires the primary core namespace
hmm.. you are right… I don’t either… I’ve been mainly browsing the source in github, which is different than what I have generated too
and it is also using devcards 0.2.0-SNAPSHOT…. while running, looking at target/figwheel_temp/devcards/figwheel/connect.cljs
it it getting the (devcards.core/start-devcard-ui!)
call there
Hey guys I getting ready to travel today and I'm behind, otherwise I jump right in here. I'll be available tomorrow for sure and I'll check back later .....
Thanks @bhauman. I think I just made a breakthrough and got it working, but need to make sure I understand what I did
@bhauman: yes, good travels. And devcards seems very intriguing so looking forward to exploring this more
so, in my case I had my own call to start-devcard-ui! in my cljs source, but as you pointed out figwheel is doing this itself (presumably because we pass :devcards true
to figwheel int eh cljsbuild settings. For me the devcards ui had been starting but no cards. Now when I just let figwheel do it my cards are picked up and displayed
@ericstewart: congrats!
@darwin: in your project are you generating a separate js file for devcards as the template project does?
yes, this is what I did so far, but my project is more complex: https://github.com/darwin/plastic/commit/cf85285278bcc67df6eea1fcfc5fe2c439c017d1
and is that the one you are loading?
yes, but I have my own figwheel client config and patches, so I need to go back and start from scratch I guess
this is what I do to figwheel: https://github.com/darwin/plastic/blob/master/cljs/src/dev/plastic/dev/figwheel.cljs
I have to go now, will get back in 3 hours and then will continue, I’m pretty confident, I will be able to figure the issue out, will report back
ah, interesting. Yes, I suppose something there could be interfering
Here's the secret if you don't use :devcards true in the :Figwheel config you need to put devcards true in the build options
hmm… in his code itlooks like the :figwheel options that includes {:devcards true} is in the compiler map, not the overall build configuration map…
":devcards true" in the Figwheel options generates the start-ui code and propagates devcards true to the compiler config. We need devcards true in the compiler config as a switch to enable or disable the defcard macro.
ah, that might be it, my original :figwheel key was in :compiler of :cljsbuild profile (probably a mistake from early days)
great!
Here's my devcards project if it helps anyone: https://github.com/decomplect/ive