Skip to content

Commit

Permalink
chore(public-docsite-v9): update getVnextStories function for gradual…
Browse files Browse the repository at this point in the history
… v9 package migration (microsoft#25221)
  • Loading branch information
TristanWatanabe authored and NotWoods committed Nov 18, 2022
1 parent 678662d commit 5c61bfd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apps/public-docsite-v9/.storybook/main.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ function getVnextStories() {
.filter(pkgName => pkgName.startsWith('@fluentui/') && !excludedDependencies.includes(pkgName))
.map(pkgName => {
const name = pkgName.replace('@fluentui/', '');
const storiesGlob = '/src/**/@(index.stories.@(ts|tsx)|*.stories.mdx)';
const storiesGlob = '**/@(index.stories.@(ts|tsx)|*.stories.mdx)';

return `../../../packages/react-components/${name}${storiesGlob}`;
//TODO: simplify once v9 migration [https://github.com/microsoft/fluentui/issues/24129] is complete.
if (fs.existsSync(`../../packages/react-components/${name}/stories/`)) {
return `../../../packages/react-components/${name}/stories/${storiesGlob}`;
} else {
return `../../../packages/react-components/${name}/src/${storiesGlob}`;
}
});
}

Expand Down

0 comments on commit 5c61bfd

Please sign in to comment.