Instead of having consumers require every story file, we can do a glob-pattern match and auto-load.
This is consistent with how tools like jest work.
Another common idiom I see is *.stories.js, but I'd be happy if we agree on a single naming scheme.
IMO it should be able to load any of:
*.stories.js, *.story.js, story.js, stories.js
A use-case where you want story.js or stories.js is something like:
I would rather have an addon that auto loads all my stories when instructed rather than have this behaviour applied by default
I think the *.jsx extension should be added as well.
If we talk about add this pattern to "getstorybook" as default, I think It's great. It allows people to start writing stories just after adding storybook to their project but also lefts flexibility of manual customization
I'm gonna toss it into the cli for 3.3.
@danielduan that sounds great!
In #1209 I'd also like the visit the idea of configuring this in a config, much like how you set a testPattern for jest.
Works in 3.3.0-alpha.4
Most helpful comment
I would rather have an addon that auto loads all my stories when instructed rather than have this behaviour applied by default