mirror of
https://github.com/yldio/copilot.git
synced 2024-11-13 06:40:06 +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