Closed sync-by-unito[bot] closed 2 years ago
I wrote some code on a Vue project to get Storybook to output a JSON file containing a list of stories. I remember the documentation around the feature was a bit weak but I could find the work I did and share it here if that would be useful?
@philwolstenholme that would be fantastic!
Here you go @ModulesUnraveled:
as an npm script:
scripts: {
"storybook:generate-stories-file": "npx sb extract ./storybook ./storybook/stories.json",
}
That will read from the Storybook configured in the ./storybook
directory and output a JSON list of stories to ./storybook/stories.json
.
The documentation is a bit hidden away in the 'Storybook composition' section of the docs: https://storybook.js.org/docs/react/workflows/storybook-composition#improve-your-storybook-composition
I discussed with @ModulesUnraveled and am closing this issue in favor of moving it to the compound project at https://github.com/emulsify-ds/compound/issues/42.
Now that the Storybook 6 update is merged, we should look into automating this component list.
┆Issue is synchronized with this Jira Story by Unito