Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeasday committed Jun 29, 2022
1 parent 481e05a commit e35167e
Show file tree
Hide file tree
Showing 17 changed files with 578 additions and 121 deletions.
1 change: 1 addition & 0 deletions addons/docs/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export const storyIndexers = async (indexers: StoryIndexer[] | null) => {
{
test: /(stories|story)\.mdx$/,
indexer: mdxIndexer,
addDocsTemplate: true,
},
...(indexers || []),
];
Expand Down
6 changes: 5 additions & 1 deletion lib/addons/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ export type StoryIndexEntry = BaseIndexEntry & {
export type DocsIndexEntry = BaseIndexEntry & {
storiesImports: Path[];
type: 'docs';
legacy?: boolean;
standalone: boolean;
};

export type StandaloneDocsIndexEntry = DocsIndexEntry & { standalone: true };
export type TemplateDocsIndexEntry = DocsIndexEntry & { standalone: false };

export type IndexEntry = StoryIndexEntry | DocsIndexEntry;

// The `any` here is the story store's `StoreItem` record. Ideally we should probably only
Expand Down
1 change: 1 addition & 0 deletions lib/core-common/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ export interface StoryIndex {
export interface StoryIndexer {
test: RegExp;
indexer: (fileName: string, options: IndexerOptions) => Promise<StoryIndex>;
addDocsTemplate?: boolean;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/core-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@storybook/core-events": "7.0.0-alpha.6",
"@storybook/csf": "0.0.2--canary.4566f4d.1",
"@storybook/csf-tools": "7.0.0-alpha.6",
"@storybook/docs-mdx": "0.0.1-canary.1.4bea5cc.0",
"@storybook/docs-mdx": "0.0.1-canary.12433cf.0",
"@storybook/manager-webpack5": "7.0.0-alpha.6",
"@storybook/node-logger": "7.0.0-alpha.6",
"@storybook/semver": "^7.3.2",
Expand Down
Loading

0 comments on commit e35167e

Please sign in to comment.