How to create documentation.json for each project configured with storybook?
See original GitHub issuenx g @nrwl/angular:storybook-configuration <project-name>
does not create documentation.json for that specific lib / app. How to create documentation.json for each project which are configured with storybook? Can we have some kind of executor/task or so to generate it? something like: nx run project-name:generate-doc
and also can it be even part of storybook runner task?
For Angular we have to do something like the below: but for multiple libs/apps how we can do this?
{
...
"scripts": {
"docs:json": "compodoc -p ./tsconfig.json -e json -d .",
"storybook": "npm run docs:json && start-storybook -p 6006 -s src/assets",
...
},
}
Issue Analytics
- State:
- Created a year ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Preview and build docs - Storybook
Storybook allows you to generate a preview of the final documentation when you use the --docs flag. We recommend including it in your...
Read more >Configure Storybook
Configure story loading ... By default, Storybook will load stories from your project based on a glob (pattern matching string) in .storybook/main.js that...
Read more >Document for stakeholders - Storybook Tutorials - JS.ORG
Write stories, generate docs. With the Storybook Docs addon, we can generate rich documentation from existing stories to reduce maintenance time and get...
Read more >DocsPage - Storybook - JS.ORG
It aggregates your stories, text descriptions, docgen comments, args tables, and code examples into a single page for each component. The best practice...
Read more >JSON Schema Addon | Storybook: Frontend workshop for UI ...
1. Explore associated JSON Schema documentation, in a nicely organized fashion in the JSON Schema Explorer · 2. Configure components through Controls, copy...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This way it works!!
Hi there @its-ratikant !
So, I see you’re using Angular with Storybook and Nx. In that case, you can use the Storybook official documentation for how to create docs.
If you’re using React with Storybook and Nx, I dare say the process would be quite similar, here’s the Storybook documentation.
There is no executor on the Nx side at the moment to generate docs for all projects that have a Storybook configuration at once, since, I believe this could fall easily into traps - or assumptions as to how each project is configured.
However, if you do want to generate docs massively, for more than one project at the time, you can configure the
storybook
/build-storybook
targets of your projects (in each project’sproject.json
) to usecompodoc
and generate docs. Then, you can use therun-many
command, and generate the docs for all the projects you provide!Take a look here as well. You can create your custom
target
and combine thestorybook
command into one!Let me know if that’s helpful, or if you need any more info!