sorting stories alphabetically

This commit is contained in:
Alex Windett 2017-01-11 14:08:47 +00:00
parent 74c061a6cd
commit 466fe72459

View File

@ -3,7 +3,13 @@ const { configure } = require('@kadira/storybook');
const req = require.context('../src/components', true, /story.js$/)
function loadStories() {
req.keys().forEach((filename) => req(filename));
let stories = req.keys();
stories = stories.sort();
stories.forEach( story => req(story));
// Fallback to stories/index.js file for anything that
// hasn't been moved
require('../stories');
}