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

buildStoriesJson should add stories.json entries for .svelte stories #18081

Closed
IanVS opened this issue Apr 27, 2022 · 3 comments
Closed

buildStoriesJson should add stories.json entries for .svelte stories #18081

IanVS opened this issue Apr 27, 2022 · 3 comments

Comments

@IanVS
Copy link
Member

IanVS commented Apr 27, 2022

Is your feature request related to a problem? Please describe
I was trying to enable the test-runner for svelte-native story files using stories.json mode as suggested in storybookjs/test-runner#80 (comment), but I found that stories.json is not generated for .svelte stories, see

if (!['.js', '.jsx', '.ts', '.tsx', '.mdx'].includes(ext)) {
logger.info(`Skipping ${ext} file ${relativePath}`);
return;
}
.

Describe the solution you'd like
It would be cool if stories.json included .svelte files. Or, if that's not feasible, we should document it.

Are you able to assist to bring the feature to reality?
I doubt it.

@IanVS IanVS changed the title Stories.json for .svelte stories buildStoriesJson should add stories.json entries for .svelte stories Apr 27, 2022
@dimfeld
Copy link

dimfeld commented May 18, 2022

I looked into this a bit when trying to make storyStoreV7 work with Svelte, and at a minimum the StoryIndexGenerator needs a way to use the CSF parser that currently lives in addon-svelte-csf instead of the normal CSF parser built into core.

See also #16673

@shilman
Copy link
Member

shilman commented Jun 6, 2022

Egads!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-alpha.0 containing PR #18355 that references this issue. Upgrade today to the @future NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@IanVS
Copy link
Member Author

IanVS commented Dec 30, 2022

This has been addressed in 7.0, which allows indexing svelte files. The latest 3.0.0 prerelease versions of @storybook/addon-svelte-csf use the new story indexer added in 7.0.

@IanVS IanVS closed this as completed Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants