sorting stories alphabetically
This commit is contained in:
parent
74c061a6cd
commit
466fe72459
@ -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');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user