You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
As it stands, the storybook init command is not meant to be run within an empty directory. While the documentation explicitly advises against using the command in this scenario, users often expect the init command to work similarly to other popular command-line tools' init commands. So let's support running storybook init in an empty directory to help new users streamline the initial setup process.
Describe the solution you'd like
Since we already have the storybook sandbox command that creates reproductions in templates of the users' choosing, I think we can leverage that to help new users bootstrap a working Storybook in an empty directory. The flow would go:
Detect user ran init within an empty directory
Run a modified version of storybook sandbox:
the "intro" and "outro" copy should change since they are currently designed for reproduction purposes only
Is your feature request related to a problem? Please describe
As it stands, the
storybook init
command is not meant to be run within an empty directory. While the documentation explicitly advises against using the command in this scenario, users often expect theinit
command to work similarly to other popular command-line tools'init
commands. So let's support runningstorybook init
in an empty directory to help new users streamline the initial setup process.Describe the solution you'd like
Since we already have the
storybook sandbox
command that creates reproductions in templates of the users' choosing, I think we can leverage that to help new users bootstrap a working Storybook in an empty directory. The flow would go:init
within an empty directorystorybook sandbox
:root
storybook dev
(and for react templates, run it with the onboarding flag) automatically after a successfulinit
.storybook dev <url-params>
afterstorybook init
#22871 already?Unresolved Questions
Follow-up TODOs
(not officially in scope for this feature request but writing it down here so we don't forget)
npx storybook init
prominently to the Storybook frontpageDescribe alternatives you've considered
No response
Are you able to assist to bring the feature to reality?
no
Additional context
No response
cc @shilman @yannbf
The text was updated successfully, but these errors were encountered: