Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add --storybook-base-dir to support TurboSnap with a prebuilt Storybook originating from a subdirectory #455

Merged

Conversation

ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Nov 26, 2021

Fixes #403

This allows TurboSnap (via --only-changed) to be used with a prebuilt Storybook (via --storybook-build-dir or -d).

In case the prebuilt Storybook does not originate from the same location where Chromatic runs, this would result in zero changed stories getting detected, thus running no tests at all. This PR adds --storybook-base-dir to correct for that.

TODO: Show a warning when we detect this discrepancy (using a heuristic) and suggest to use --storybook-base-dir.

@ghengeveld ghengeveld requested a review from tmeasday November 26, 2021 12:07
@ghengeveld ghengeveld force-pushed the ghengeveld/ch-981-incompatible-options---storybook-build branch from 79415c7 to 620c24c Compare November 26, 2021 14:02
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.

OK, I think makes sense!

@ghengeveld ghengeveld merged commit fde8970 into main Nov 29, 2021
@ghengeveld ghengeveld deleted the ghengeveld/ch-981-incompatible-options---storybook-build branch November 29, 2021 08:37
@ghengeveld
Copy link
Member Author

This was released in 6.1.0.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatible options: --storybook-build-dir (-d), --only-changed
2 participants