about summary refs log tree commit diff
diff options
context:
space:
mode:
authorusagi-f <usagi.f@gmail.com>2017-04-18 23:04:35 +0900
committerEugen <eugen@zeonfederated.com>2017-04-18 16:04:35 +0200
commitd90b1650d805f4cede5cff255530aa3fb4429864 (patch)
tree995a924bec9d2a0055d4e2bb8e4db301aabff37e
parent23ecc681c4e2b817c9694dbd465b5a7847ca38c3 (diff)
Update storybook file autoload (#2057)
-rw-r--r--storybook/config.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/storybook/config.js b/storybook/config.js
index 924eadf49..976b83af0 100644
--- a/storybook/config.js
+++ b/storybook/config.js
@@ -14,11 +14,10 @@ window.storiesOf = storiesOf;
 window.action    = action;
 window.React     = React;
 
+let req = require.context('./stories/', true, /.story.jsx$/);
+
 function loadStories () {
-  require('./stories/loading_indicator.story.jsx');
-  require('./stories/button.story.jsx');
-  require('./stories/character_counter.story.jsx');
-  require('./stories/autosuggest_textarea.story.jsx');
+  req.keys().forEach((filename) => req(filename))
 }
 
 configure(loadStories, module);