sass-extract icon indicating copy to clipboard operation
sass-extract copied to clipboard

Include doc comments

Open chavlji opened this issue 4 years ago • 1 comments

I find this plugin great for documentation purposes (used in Storybook pages).

Would it be possible to somehow add doc comments found in the preceding lines?

Eg: Screenshot 2020-11-15 at 16 02 32

So object for this variable would also include {... comments: ['Color for emphasized texts']} This would enable us to keep documentation together with code.

chavlji avatar Nov 15 '20 16:11 chavlji

Unrelated to your actual problem, but would you mind explaining how you use sass-extract with Storybook?

maximedaoust avatar Sep 18 '21 15:09 maximedaoust

Since we actually compile the sass source to extract variables I'm fairly sure comments are not preserved, and it would likely require traversing the source AST separately, which is not in scope.

jgranstrom avatar Oct 25 '23 19:10 jgranstrom