devcards

Devcards aims to provide a visual REPL experience for ClojureScript https://github.com/bhauman/devcards
kauko 2016-11-23T05:12:24.000165Z

@peeja you can access a function's docstring with the doc function.. can you use that?

peeja 2016-11-23T16:22:36.000166Z

@kauko Right, that's exactly what I mean. If I do that in a defcard, it's not interpreted as the documentation string for the card, it's interpreted as the content of the card, because it's not a string literal

kauko 2016-11-23T17:01:25.000167Z

Huh, tbh not really sure what you mean by the documentation.. it's been a while since I last used devcards

kauko 2016-11-23T17:02:24.000168Z

Trying to look at the docs. I see there's an :options key, but I don't remember what it does exactly.

kauko 2016-11-23T17:05:06.000169Z

Ah, I meant, there's a :documentation key πŸ™‚

kauko 2016-11-23T17:05:57.000170Z

@peeja are you saying {:options {:documentation (doc my-component)}} doesn't work..?

peeja 2016-11-23T17:06:57.000171Z

I mean the string that comes right after the name of the card: (defcard a-name "Some documentation" (a-component))

peeja 2016-11-23T17:07:06.000172Z

Does :documentation do the same thing?

kauko 2016-11-23T17:07:13.000173Z

Yeah I think so

peeja 2016-11-23T17:07:22.000174Z

Ooh, I'll have to try that…

kauko 2016-11-23T17:07:50.000175Z

Heh, should've mentioned the :options from the get-go πŸ™‚ Sorry. http://rigsomelight.com/devcards/#!/devdemos.custom_cards

kauko 2016-11-23T17:07:58.000176Z

It's documented pretty well in there

kauko 2016-11-23T17:08:23.000177Z

oh, it looks like :documentation is not under :options

kauko 2016-11-23T17:08:26.000178Z

it is its own key

peeja 2016-11-23T17:09:04.000179Z

Oh, I see, you can't use that with defcard, though

peeja 2016-11-23T17:09:10.000180Z

I'll need to make my own macro?

kauko 2016-11-23T17:09:31.000181Z

whaa

kauko 2016-11-23T17:09:35.000182Z

I'm sure you can use it

peeja 2016-11-23T17:09:46.000183Z

Where do I give :documentation?

kauko 2016-11-23T17:10:06.000184Z

huh

kauko 2016-11-23T17:10:13.000185Z

maybe you can't.. hmm

kauko 2016-11-23T17:10:42.000186Z

oh sorry http://rigsomelight.com/devcards/#!/devdemos.defcard_api

kauko 2016-11-23T17:10:47.000187Z

Here's the documentation πŸ™‚

peeja 2016-11-23T17:10:48.000188Z

Oh, you can also use it by implementing dc/IDevcardOptions on the object in the card

peeja 2016-11-23T17:11:11.000189Z

I don't see :documentation on http://rigsomelight.com/devcards/#!/devdemos.defcard_api

kauko 2016-11-23T17:11:23.000190Z

Try to put it in the :options map

kauko 2016-11-23T17:11:31.000191Z

that you can give as the last argument to defcard

peeja 2016-11-23T17:11:50.000192Z

No dice 😞

kauko 2016-11-23T17:12:07.000193Z

argh

kauko 2016-11-23T17:12:11.000194Z

should be there IMHO

kauko 2016-11-23T17:12:13.000195Z

PR time? πŸ˜‰

peeja 2016-11-23T17:12:22.000196Z

Yeah, maybe πŸ™‚

peeja 2016-11-23T17:13:00.000197Z

Yeah, looks like those options are the :options, and there's no way to set the :documentation from there

peeja 2016-11-23T17:13:06.000198Z

(other than the string literal)