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

CLI: Force welcome stories to show up first in load order #7979

Merged
merged 2 commits into from
Sep 4, 2019

Conversation

shilman
Copy link
Member

@shilman shilman commented Sep 3, 2019

Issue: #7953

What I did

Rename the CLI templates:

  • Welcome.stories.js => 0-Welcome.stories.js
  • Button.stories.js => 1-Button.stories.js

This forces Welcome to the top and to show up first, without needlessly complicating the user's config with storySort or complicated configure logic.

How to test

Manually simulate the change in a fresh project:

npx create-react-app cra3
cd cra3/
npx -p @storybook/cli@next sb init
yarn storybook
cd src/stories/
mv Welcome.stories.js 0-Welcome.stories.js
mv Button.stories.js 1-Button.stories.js
cd ../..
yarn storybook

@vercel
Copy link

vercel bot commented Sep 3, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

@shilman shilman added this to the 5.2.0 milestone Sep 3, 2019
Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

Seems like the best way to do it for now :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants