-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Research: Explore automatically generating stories from docs-json build output #2173
Comments
Started looking into this and based on the info from
There are two key missing pieces affecting automating stories:
@caripizza @driskull Do you have any suggestions on what we could do for this? Any sort of file requiring manual edits defeats the purpose, IMO. |
For the range issue, I think we can avoid interfaces for now until the bug is fixed.
The only way I can think of doing this is with another JSON (basic.md.json?) file where we can specify which knobs should be excluded for the usage example. Then we could access that data using custom docs generation. https://stenciljs.com/docs/docs-custom and build the storybook files? Unless we can have some kind of markdown comment or code where we can specify that information and strip it out? |
If we just need to specify knobs per component, then maybe custom jsdoc tags could work? https://stenciljs.com/docs/docs-json#custom-jsdocs-tags |
Inlining would certainly help. I also forgot to mention that default values coming from a module would also need to be inlined. I know it's small, but I'd rather avoid doing so since we do use that pattern often. I'll see if I can do this w/o explicitly inlining interfaces/types/default values.
I like the idea of having special markers in the usage files. It would keep knob info close to the story source. |
Yeah, we can have a HTML comment that won't be rendered with some kind of parsable formatting. |
Background
To improve our storybook workflow,
docs-json.json
could help create stories since it includes metadata for all components.Desired Outcome
Have a script that creates stories for all components from
docs-json.json
.The text was updated successfully, but these errors were encountered: