mirror of
https://github.com/yldio/copilot.git
synced 2024-11-14 07:10:05 +02:00
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$/)
|
const req = require.context('../src/components', true, /story.js$/)
|
||||||
|
|
||||||
function loadStories() {
|
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');
|
require('../stories');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user