Skip to content

Instantly share code, notes, and snippets.

@chrisforrette
Created January 19, 2018 00:24
Show Gist options
  • Save chrisforrette/5bfc647783de7f5a3eacfa3118b0fa29 to your computer and use it in GitHub Desktop.
Save chrisforrette/5bfc647783de7f5a3eacfa3118b0fa29 to your computer and use it in GitHub Desktop.
.storybook/config.js
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