Fork me on GitHub
#devcards
<
2016-11-23
>
kauko05:11:24

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

peeja16:11:36

@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

kauko17:11:25

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

kauko17:11:24

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

kauko17:11:06

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

kauko17:11:57

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

peeja17:11:57

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

peeja17:11:06

Does :documentation do the same thing?

kauko17:11:13

Yeah I think so

peeja17:11:22

Ooh, I'll have to try that…

kauko17:11:50

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

kauko17:11:58

It's documented pretty well in there

kauko17:11:23

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

kauko17:11:26

it is its own key

peeja17:11:04

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

peeja17:11:10

I'll need to make my own macro?

kauko17:11:35

I'm sure you can use it

peeja17:11:46

Where do I give :documentation?

kauko17:11:13

maybe you can't.. hmm

kauko17:11:47

Here's the documentation πŸ™‚

peeja17:11:48

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

kauko17:11:23

Try to put it in the :options map

kauko17:11:31

that you can give as the last argument to defcard

peeja17:11:50

No dice 😞

kauko17:11:11

should be there IMHO

kauko17:11:13

PR time? πŸ˜‰

peeja17:11:22

Yeah, maybe πŸ™‚

peeja17:11:00

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

peeja17:11:06

(other than the string literal)