You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configure/overview.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,7 @@ For example, if you wanted to pull both `.md` and `.js` files from the `my-proje
85
85
86
86
### With a configuration object
87
87
88
-
Additionally, you can customize your Storybook configuration to load your stories based on a configuration object. For example, if you wanted to load your stories from a `packages` directory, you could adjust your `stories` configuration field into the following:
88
+
Additionally, you can customize your Storybook configuration to load your stories based on a configuration object. For example, if you wanted to load your stories from a `packages/components` directory, you could adjust your `stories` configuration field into the following:
89
89
90
90
<!-- prettier-ignore-start -->
91
91
@@ -98,7 +98,7 @@ Additionally, you can customize your Storybook configuration to load your storie
98
98
99
99
<!-- prettier-ignore-end -->
100
100
101
-
When Storybook starts, it will look for any file containing the `stories` extension inside the `packages/stories` directory and generate the titles for your stories.
101
+
When Storybook starts, it will look for any file containing the `stories` extension inside the `packages/components` directory and generate the titles for your stories.
Copy file name to clipboardExpand all lines: docs/configure/typescript.md
+4-36Lines changed: 4 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,34 +6,19 @@ Storybook provides an integrated [TypeScript](https://www.typescriptlang.org/) e
6
6
7
7
## Configure Storybook with TypeScript
8
8
9
-
Storybook's configuration file (i.e., `main.ts`) is defined as an ESM module written in TypeScript, providing you with the baseline configuration to support your existing framework while enabling you stricter type-checking and autocompletion in your editor. Below is an abridged configuration file and additional information about the various configuration elements.
9
+
Storybook's configuration file (i.e., `main.ts`) is defined as an ESM module written in TypeScript, providing you with the baseline configuration to support your existing framework while enabling you stricter type-checking and autocompletion in your editor. Below is an abridged configuration file.
|`stories`| The array of globs that indicates the [location of your story files](#configure-story-loading), relative to `main.ts`|
25
-
|`staticDirs`| Sets a list of directories of [static files](./images-and-assets.md#serving-static-files-via-storybook-configuration) to be loaded by Storybook <br/> `staticDirs:['../public']`|
26
-
|`addons`| Sets the list of [addons](https://storybook.js.org/addons/) loaded by Storybook <br/> `addons: ['@storybook/addon-essentials']`|
|`framework`| Configures Storybook based on a set of [framework-specific](./frameworks.md) settings <br/> `framework: { name: '@storybook/svelte-vite', options:{} }`|
See the [main configuration API reference](../api/main-config) for more details and additional properties.
37
22
38
23
<divclass="aside">
39
24
@@ -43,24 +28,7 @@ Storybook's configuration file (i.e., `main.ts`) is defined as an ESM module wri
43
28
44
29
### Extending the default configuration
45
30
46
-
Out of the box, Storybook is built to work with a wide range of third-party libraries, enabling you to safely access and document metadata (e.g., props, inputs) from your components without any additional configuration. It relies on [`babel-loader`](https://webpack.js.org/loaders/babel-loader/) for TypeScript support and optionally [`fork-ts-checker-webpack-plugin`](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/blob/v4.1.6/README.md#options) for type checking. Since Storybook supports multiple frameworks, it also includes a set of third-party packages to support each framework (e.g., `ts-loader` and `ngx-template-loader` for Angular, `react-docgen-typescript-plugin` for React). If you need to customize the default configuration for a specific use case scenario, you can extend the default configuration to suit your needs. Listed below are some examples and a table with the available options.
|**check**| All | Optionally run fork-ts-checker-webpack-plugin | boolean |
61
-
|**checkOptions**| All | Options to pass to fork-ts-checker-webpack-plugin if it's enabled | <ahref="https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/blob/v4.1.6/README.md#options">See Docs</a> |
62
-
|**reactDocgen**| React | Which react docgen processor to run: `"react-docgen-typescript"`, `"react-docgen"`, `false`| string or false |
63
-
|**reactDocgenTypescriptOptions**| React | Options to pass to react-docgen-typescript-plugin if react-docgen-typescript is enabled. |[See docs](https://github.com/hipstersmoothie/react-docgen-typescript-plugin)|
31
+
Out of the box, Storybook is built to work with a wide range of third-party libraries, enabling you to safely access and document metadata (e.g., props, inputs) from your components without any additional configuration. It relies on [`babel-loader`](https://webpack.js.org/loaders/babel-loader/) for TypeScript support and optionally [`fork-ts-checker-webpack-plugin`](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/blob/v4.1.6/README.md#options) for type checking. Since Storybook supports multiple frameworks, it also includes a set of third-party packages to support each framework (e.g., `ts-loader` and `ngx-template-loader` for Angular, `react-docgen-typescript-plugin` for React). If you need to customize the default configuration for a specific use case scenario, refer to the [`config.typescript` API reference](../api/main-config-typescript.md).
64
32
65
33
The above example extends the baseline configuration to remove existing props from third-party libraries. Useful if you want to document only your components. However, if you need to include them, you can do so by adjusting your configuration as follows:
0 commit comments