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

Storyshots: Fix support for jsx/tsx config files #9834

Merged
merged 4 commits into from Feb 14, 2020

Conversation

@davidgoli
Copy link
Contributor

@davidgoli davidgoli commented Feb 12, 2020

Issue: #9771

What I did

Implemented support for *.jsx and *.tsx preview files.

How to test

  • Added a Jest unit test for the new behavior.
  • Verified in the minimal repro repository (in the linked issue) that these changes fix the original issue.
@davidgoli davidgoli requested review from igor-dv and thomasbertet as code owners Feb 12, 2020
.flatMap(filename => supportedExtensions.map(ext => `${filename}.${ext}`))
.map(filename => path.join(configDir, filename));

return allFilenames.find(isFile) || false;
};

const getMainFile = (configDir: string): string | false => {

This comment has been minimized.

@davidgoli

davidgoli Feb 12, 2020
Author Contributor

question: should the same file extension support be implemented for main.js as well?

This comment has been minimized.

@shilman

shilman Feb 12, 2020
Member

Yes please! 🙏

@davidgoli davidgoli force-pushed the davidgoli:support-jsx-preview-files branch from 999412e to d1e5349 Feb 12, 2020
@davidgoli davidgoli force-pushed the davidgoli:support-jsx-preview-files branch from d1e5349 to 2fe47b6 Feb 12, 2020
@shilman shilman changed the title Implement support for jsx/tsx preview files Storyshots: Fix support for jsx/tsx config files Feb 12, 2020
@shilman shilman added the patch label Feb 12, 2020
@shilman shilman added this to the 5.3.x milestone Feb 12, 2020
@ndelangen
Copy link
Member

@ndelangen ndelangen commented Feb 14, 2020

Awesome, looks great to me!

@ndelangen ndelangen merged commit bc83e98 into storybookjs:next Feb 14, 2020
20 of 25 checks passed
20 of 25 checks passed
@github-actions
Automention
Details
@github-actions
Danger JS
Details
@netlify
Header rules Deploy failed
Details
@netlify
Mixed content Deploy failed
Details
@netlify
Pages changed Deploy failed
Details
@netlify
Redirect rules Deploy failed
Details
@netlify
deploy/netlify Deploy preview failed.
Details
@packtracker
packtracker/images No images assets found.
Details
@packtracker
packtracker/javascript 7.81 MB — No Change
Details
DeepScan 0 new and 0 fixed issues
Details
ci/chromatic 355 stories unchanged.
Details
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: chromatic Your tests passed on CircleCI!
Details
ci/circleci: coverage Your tests passed on CircleCI!
Details
ci/circleci: docs Your tests passed on CircleCI!
Details
ci/circleci: e2e Your tests passed on CircleCI!
Details
ci/circleci: examples Your tests passed on CircleCI!
Details
ci/circleci: frontpage Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: packtracker Your tests passed on CircleCI!
Details
ci/circleci: smoke-tests Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@circleci-checks
deploy Workflow: deploy
Details
@circleci-checks
test Workflow: test
Details
@shilman
Copy link
Member

@shilman shilman commented Feb 15, 2020

Great job @davidgoli. Clean!!!

@shilman shilman added the picked label Feb 25, 2020
shilman added a commit that referenced this pull request Feb 25, 2020
Storyshots: Fix support for jsx/tsx config files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants