sassdoc icon indicating copy to clipboard operation
sassdoc copied to clipboard

optional parameters

Open michelkaeser opened this issue 12 years ago • 2 comments

Hi there

WOW, sassdoc rocks! I'm so glad I came across your repo. Thanks for this wonderful pieces of code.

But, question: Is it possible to declare parameters as optional?

Thx & looking forward to generate some docs with sassdoc - still amazed :)

michelkaeser avatar Dec 19 '12 18:12 michelkaeser

Thanks for the feedback and the great suggestion.

I definitely want to support this. I opted not to make this a doc syntax as I want to eventually integrate the Sass parser and derive this from the source. e.g.

// @param   $something {String} a string of something
@mixin doSomething($something: anything) { ... }

I should be able to derive that $something is optional, and surface the default value.

I'd also like to do this for default config values. e.g.

$SOME_CONFIG:  12345 !default;

That said, I haven't had time to dig into this so it's still a dream for now :)

After the holidays, I hope to take some time to dig into the Sass parser and figure out how I can tie comments to declarations. Once I figure that out, I'll probably re-write SassDoc to take advantage of all those wonderful things Sass can do.

I'll also publish a roadmap for SassDoc, which I haven't done yet.

eoneill avatar Dec 19 '12 19:12 eoneill

We are very keen for this to be added as well! Any ETA on this?

u982744 avatar Nov 27 '13 01:11 u982744