Skip to content

Commit e9051fa

Browse files
committed
refactor: move script to a separate package
1 parent 128a156 commit e9051fa

28 files changed

+1902
-1702
lines changed

apps/chart-docsite/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"build-storybook": "storybook build -o ./dist/storybook --docs",
88
"postbuild-storybook": "yarn rewrite-title && yarn generate-llms-docs",
99
"rewrite-title": "node -r ../../scripts/ts-node/src/register ../../scripts/storybook/src/scripts/rewrite-title.ts --title 'Fluent UI Charts v9' --distPath ./dist/storybook",
10-
"generate-llms-docs": "node -r ../../scripts/ts-node/src/register ../../scripts/storybook/src/scripts/generate-llms-docs.ts --distPath ./dist/storybook --baseUrl \"https://fluentuipr.z22.web.core.windows.net/pull/34838/chart-docsite/storybook\" --summaryTitle \"Fluent UI Charts v9\" --summaryDescription \"Fluent UI React charts is a set of modern, accessible, interactive, lightweight and highly customizable visualization library representing the Microsoft design system. These charts are used across 100s of projects inside Microsoft across Microsoft 365, Copilot and Azure.\"",
10+
"generate-llms-docs": "yarn storybook-llms-extractor --distPath ./dist/storybook --baseUrl \"https://fluentuipr.z22.web.core.windows.net/pull/34838/chart-docsite/storybook\" --summaryTitle \"Fluent UI Charts v9\" --summaryDescription \"Fluent UI React charts is a set of modern, accessible, interactive, lightweight and highly customizable visualization library representing the Microsoft design system. These charts are used across 100s of projects inside Microsoft across Microsoft 365, Copilot and Azure.\"",
1111
"clean": "just-scripts clean",
1212
"code-style": "just-scripts code-style",
1313
"just": "just-scripts",

apps/public-docsite-v9/.storybook/main.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ module.exports = /** @type {Omit<import('../../../.storybook/main'), 'typescript
5252
charts: {
5353
title: 'Charts v9',
5454
// Workaround to enable docsite using PR workflow till master workflow is enabled
55-
// url: 'https://fluentuipr.z22.web.core.windows.net/pull/33270/chart-docsite/storybook',
56-
// TODO: revert this to the correct url before merging
57-
url: 'https://fluentuipr.z22.web.core.windows.net/pull/34838/chart-docsite/storybook',
55+
url: 'https://fluentuipr.z22.web.core.windows.net/pull/33270/chart-docsite/storybook',
5856
expanded: false,
5957
sourceUrl: 'https://github.com/microsoft/fluentui/charts/react-charts',
6058
},

apps/public-docsite-v9/llms.config.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

apps/public-docsite-v9/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"build-storybook": "cross-env NODE_OPTIONS=--max_old_space_size=3072 storybook build -o ./dist/storybook --docs",
88
"postbuild-storybook": "yarn rewrite-title && yarn generate-llms-docs",
99
"rewrite-title": "node -r ../../scripts/ts-node/src/register ../../scripts/storybook/src/scripts/rewrite-title.ts --title 'Fluent UI React v9' --distPath ./dist/storybook",
10-
"generate-llms-docs": "node -r ../../scripts/ts-node/src/register ../../scripts/storybook/src/scripts/generate-llms-docs.ts --config llms.config.js",
10+
"generate-llms-docs": "yarn storybook-llms-extractor --config storybook-llms.config.js",
1111
"clean": "just-scripts clean",
1212
"code-style": "just-scripts code-style",
1313
"just": "just-scripts",
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// @ts-check
2+
3+
const storybookConfig = require('./.storybook/main');
4+
5+
/**
6+
* Config for the LLMs docs generator script.
7+
* @see {@link file://./../../tools/storybook-llms-extractor/src/cli.ts}
8+
*
9+
* @type {import('@fluentui/storybook-llms-extractor').Args}
10+
*/
11+
module.exports = {
12+
distPath: './dist/storybook',
13+
baseUrl: 'https://react.fluentui.dev',
14+
summaryTitle: 'Fluent UI React v9',
15+
summaryDescription:
16+
"Fluent UI React is a library of React components that implement Microsoft's [Fluent Design System](https://fluent2.microsoft.design).",
17+
refs: storybookConfig.refs ? Object.values(storybookConfig.refs) : [],
18+
};

0 commit comments

Comments
 (0)