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

Change Style guide to Storybook #39

Merged
merged 5 commits into from
Jan 17, 2020
Merged

Conversation

JiwoonKim
Copy link
Collaborator

@JiwoonKim JiwoonKim commented Dec 26, 2019

Closes Issue #15
change the style guide for the project to storybook

Applied Changes

  • add config storybook for project (dev mode)
  • migrate styleguide examples to storybook
  • change deploy script to building storybook on github-pages (static mode)
  • remove styleguidist from project

Comment on lines +1 to +3
import { configure } from '@storybook/react';

configure(require.context('../src', true, /\.stories\.js$/), module);
Copy link
Collaborator Author

@JiwoonKim JiwoonKim Dec 26, 2019

Choose a reason for hiding this comment

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

Storybook utilizes configs in .storybook/ folder (see #15 (comment)).
Overall, this config.js file helps Storybook to work 🌈 .

ℹ️ I've also tried customizing Storybook's webpack config to utilize Neutrino's webpack config, however, had come across some undesirable results.

Since Storybook works fine even without hooking Neutrino's webpack config (and hooking Neutrino's webpack config would rather produce undesirable consequences), I think it's best we leave Storybook's config as-is.
Maybe if Storybook implements changes to use storybook.config.js to export a preset, we may be able to consider hooking webpack in the future, if necessary :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting! Thank you for the explanation, very helpful. I'll try to look into it soon and get back to you.

@JiwoonKim
Copy link
Collaborator Author

yarn storybook now displays:

image

@JiwoonKim
Copy link
Collaborator Author

JiwoonKim commented Dec 27, 2019

Since Storybook also has storyshots feature using Jest, maybe its possible to utilize this for #23 👍 https://storybook.js.org/docs/testing/structural-testing/

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

Successfully merging this pull request may close these issues.

2 participants