Created
January 19, 2018 00:24
-
-
Save chrisforrette/5bfc647783de7f5a3eacfa3118b0fa29 to your computer and use it in GitHub Desktop.
.storybook/config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { configure } from '@kadira/storybook' | |
import './addons' | |
// Get all files under `/src/components` that end with '.stories.js' | |
const req = require.context('../src/components', true, /\.stories\.js$/) | |
function loadStories () { | |
req.keys().forEach((filename) => req(filename)) | |
} | |
configure(loadStories, module) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment