Skip to content

Auto(magic) Story Registration

Compare
Choose a tag to compare
@mattrothenberg mattrothenberg released this 08 Apr 17:05
· 27 commits to master since this release

As per #3, stories are now automatically registered by the very presence of tags in a given component.

This is a breaking change.

import { registerStories } from 'vue-storybook'
import { configure } from '@storybook/vue';

const req = require.context('./', true, /\.vue$/)
function loadStories() {
  req.keys().forEach((filename) => {
    registerStories(req, filename, storiesOf, {})
  })
}
loadStories()