mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
Use a slightly simpler glob pattern
This commit is contained in:
parent
02e4a69c9e
commit
aface4be12
@ -230,7 +230,7 @@ describe('normalizeStoriesEntry', () => {
|
||||
{
|
||||
"titlePrefix": "",
|
||||
"directory": ".",
|
||||
"files": "**/*.@(mdx|stories.mdx|stories.tsx|stories.ts|stories.jsx|stories.js)",
|
||||
"files": "**/*.@(mdx|stories.@(tsx|ts|jsx|js))",
|
||||
"importPathMatcher": {}
|
||||
}
|
||||
`);
|
||||
@ -241,7 +241,7 @@ describe('normalizeStoriesEntry', () => {
|
||||
expect(specifier).toMatchInlineSnapshot(`
|
||||
{
|
||||
"titlePrefix": "",
|
||||
"files": "**/*.@(mdx|stories.mdx|stories.tsx|stories.ts|stories.jsx|stories.js)",
|
||||
"files": "**/*.@(mdx|stories.@(tsx|ts|jsx|js))",
|
||||
"directory": ".",
|
||||
"importPathMatcher": {}
|
||||
}
|
||||
@ -265,7 +265,7 @@ describe('normalizeStoriesEntry', () => {
|
||||
expect(specifier).toMatchInlineSnapshot(`
|
||||
{
|
||||
"titlePrefix": "atoms",
|
||||
"files": "**/*.@(mdx|stories.mdx|stories.tsx|stories.ts|stories.jsx|stories.js)",
|
||||
"files": "**/*.@(mdx|stories.@(tsx|ts|jsx|js))",
|
||||
"directory": ".",
|
||||
"importPathMatcher": {}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import { normalizeStoryPath } from './paths';
|
||||
import { globToRegexp } from './glob-to-regexp';
|
||||
|
||||
const DEFAULT_TITLE_PREFIX = '';
|
||||
const DEFAULT_FILES = '**/*.@(mdx|stories.mdx|stories.tsx|stories.ts|stories.jsx|stories.js)';
|
||||
const DEFAULT_FILES = '**/*.@(mdx|stories.@(tsx|ts|jsx|js))';
|
||||
|
||||
const isDirectory = (configDir: string, entry: string) => {
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user