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

fix(tools): setup/update storybook only if there stories do exist #23413

Merged
merged 1 commit into from
Jun 7, 2022

Conversation

Hotell
Copy link
Contributor

@Hotell Hotell commented Jun 6, 2022

Current Behavior

storybook setup is added to packages where its not needed

New Behavior

storybook is added only to packages that actually use/need storybook setup

Related Issue(s)

Fixes #20724

@@ -668,6 +677,8 @@ function setupStorybook(tree: Tree, options: NormalizedSchema) {
});
}

removeTsIgnorePragmas();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this should happen always no matter if init or remove of SB setup was initiated


const shouldInit = hasStories || hasTags;
const shouldDelete = !shouldInit && hasStorybookConfig;
const shouldInit = hasStories;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

simplified logic - this is now possible as no v9 component exists in react-examples. Also because create-component will create story files we can guarantee that this will be properly executed -> sb will be setup

@Hotell Hotell marked this pull request as ready for review June 6, 2022 15:00
@Hotell Hotell requested a review from a team as a code owner June 6, 2022 15:00
@Hotell Hotell requested a review from layershifter June 6, 2022 15:00
@fabricteam
Copy link
Collaborator

📊 Bundle size report

🤖 This report was generated against 635ec14c7f3abd77e9d02fa7970e501faeb2693e

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 6, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 1119de0:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@size-auditor
Copy link

size-auditor bot commented Jun 6, 2022

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: 635ec14c7f3abd77e9d02fa7970e501faeb2693e (build)

@Hotell Hotell enabled auto-merge (squash) June 7, 2022 07:19
@tudorpopams tudorpopams requested a review from andrefcdias June 7, 2022 12:14
@Hotell Hotell merged commit 02a787b into microsoft:master Jun 7, 2022
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.

migrate-converged-pkg: creates unnecessary .storybook folder
4 participants