Skip to content

Commit f77eff2

Browse files
authored
Merge pull request #28820 from storybookjs/fix-publish-snippet
Docs: Update badly-migrated snippet
2 parents c0d3fdf + 8dfc5cc commit f77eff2

File tree

3 files changed

+28
-10
lines changed

3 files changed

+28
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
```shell renderer="angular" tabTitle="with-builder"
2+
# Builds Storybook with Angular's custom builder
3+
# See https://storybook.js.org/docs/get-started/frameworks/angular#how-do-i-migrate-to-an-angular-storybook-builder
4+
# to learn how to create the custom builder
5+
ng run my-project:build-storybook
6+
```
7+
8+
```json renderer="angular" language="js" filename="package.json" tabTitle="script-for-builder"
9+
{
10+
"scripts": {
11+
"build-storybook": "ng run my-project:build-storybook"
12+
}
13+
}
14+
```

docs/_snippets/custom-build-script-production.md

-8
This file was deleted.

docs/sharing/publish-storybook.mdx

+14-2
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,26 @@ Teams publish Storybook online to review and collaborate on works in progress. T
1313

1414
## Build Storybook as a static web application
1515

16-
First, we'll need to build Storybook as a static web application. The functionality is already built-in and pre-configured for most supported frameworks. Others require a bit of customization (e.g., Angular). Run the following command inside your project's root directory:
16+
First, we'll need to build Storybook as a static web application. The functionality is already built-in and pre-configured for most supported frameworks. Run the following command inside your project's root directory:
1717

1818
{/* prettier-ignore-start */}
1919

20-
<CodeSnippets path="custom-build-script-production.md" />
20+
<CodeSnippets path="build-storybook-production-mode.md" />
2121

2222
{/* prettier-ignore-end */}
2323

24+
<If renderer="angular">
25+
26+
If you're using Angular, it's often better to use the [Angular builder](../get-started/frameworks/angular.mdx#how-do-i-migrate-to-an-angular-storybook-builder) to build Storybook:
27+
28+
{/* prettier-ignore-start */}
29+
30+
<CodeSnippets path="angular-builder-production.md" />
31+
32+
{/* prettier-ignore-end */}
33+
34+
</If>
35+
2436
<Callout variant="info" icon="💡">
2537
You can provide additional flags to customize the command. Read more about the flag options [here](../api/cli-options.mdx).
2638
</Callout>

0 commit comments

Comments
 (0)