Skip to content
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

Addon-docs: Update story index generator #20679

Merged
merged 2 commits into from
Jan 19, 2023
Merged

Conversation

sheriffMoose
Copy link
Contributor

@sheriffMoose sheriffMoose commented Jan 18, 2023

Description

Currently the matcher for CSF stories works with all files including .stories.mdx files but not other .mdx files.

This behavior actually makes it difficult for developers to import other files as DocsOnly story, for example .md files like README.md & CHANGELOG.md.

For the current time being, the matcher is updated to match to any file with the extensions .js, .jsx, .ts, .tsx along with .stories.mdx.

Please read more about the motivation behind this PR in this article
https://sheriffmoose.medium.com/storybook-markdown-docs-not-mdx-part-2-757463fcad84

Issue

N/A

What I did

  • change extract stories condition to positive matcher instead of negative matcher

How to test

  • CI passes

change extract stories condition to positive matcher instead of negative matcher
@sheriffMoose sheriffMoose marked this pull request as draft January 18, 2023 22:22
@sheriffMoose sheriffMoose marked this pull request as ready for review January 18, 2023 22:25
@shilman shilman changed the title addon-docs: update story index generator Addon-docs: Update story index generator Jan 19, 2023
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much @sheriffMoose. Love the post & the direction. Great stuff!!! 👏

@shilman shilman merged commit 4eff3e6 into storybookjs:next Jan 19, 2023
@shilman shilman added maintenance User-facing maintenance tasks and removed feature request labels Jan 19, 2023
sheriffMoose added a commit to sheriffMoose/storybook that referenced this pull request Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: docs maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants