Skip to content

Commit

Permalink
build(storybook): successful basic setup with ref below
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchenwei committed Oct 25, 2018
1 parent c3943fd commit f942f48
Show file tree
Hide file tree
Showing 6 changed files with 10,230 additions and 6,827 deletions.
24 changes: 24 additions & 0 deletions .storybook/config.js
@@ -0,0 +1,24 @@
import { configure } from '@storybook/vue';

import Vue from 'vue';
// import Vuex from 'vuex'; // Vue plugins

// Import your custom components.
// import HelloComponent from '../src/components/HelloComponent/HelloComponent.vue';

// // Install Vue plugins.
// // Vue.use(Vuex);

// // Register custom components.
// Vue.component('HelloComponent', HelloComponent);


function requireAll(requireContext) {
return requireContext.keys().map(requireContext);
}

function loadStories() {
requireAll(require.context("../src/", true, /.stories.js$/));
}

configure(loadStories, module);
2 changes: 1 addition & 1 deletion build/webpack.config.dev.js
Expand Up @@ -66,4 +66,4 @@ module.exports = {
toType: 'dir'
}])
]
}
}

0 comments on commit f942f48

Please sign in to comment.