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

[Feature Request]: Accept --configFolderPath option in automigrators & migrators #20508

Closed
mandarini opened this issue Jan 5, 2023 · 1 comment · Fixed by #20647
Closed
Assignees
Labels
cli feature request nx Prioritize Nx compatibility for angular

Comments

@mandarini
Copy link
Contributor

mandarini commented Jan 5, 2023

Is your feature request related to a problem? Please describe

We want to be able to call the automigrators from Nx. In Nx, there are multiple .storybook directories, and multiple .storybook/main|preview.js files.

From within a Nx generator, we want to recursively call the automigrators (eg. npx sb automigrate mainjsFramework) and also pass a flag to tell Storybook which directory to look into, so for example:

npx sb automigrate --fixId mainjsFramework -c apps/my-app/.storybook

That would enable us to call the automigrators from Nx, or allow anyone to call the automigrators for a Nx workspace.

Describe the solution you'd like

The functions that are listed here to accept an option for configFolderPath (or anything similarly named, to allow Nx to pass the directory).

Similarly, if there's a migrator that looks for any other Storybook-related files (eg. stories transformation) to accept a relevant glob or something (like sb migrate csf-2-to-3 which accepts --glob).

Describe alternatives you've considered

No response

Are you able to assist to bring the feature to reality?

yes, I can

Additional context

No response

@shilman
Copy link
Member

shilman commented Feb 20, 2023

Olé!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.51 containing PR #20647 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb@next upgrade --prerelease

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli feature request nx Prioritize Nx compatibility for angular
Projects
Archived in project
4 participants