Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Update badly-migrated snippet #28820

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/_snippets/angular-builder-production.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```shell renderer="angular" tabTitle="with-builder"
# Builds Storybook with Angular's custom builder
# See https://storybook.js.org/docs/get-started/frameworks/angular#how-do-i-migrate-to-an-angular-storybook-builder
# to learn how to create the custom builder
ng run my-project:build-storybook
```

```json renderer="angular" language="js" filename="package.json" tabTitle="script-for-builder"
{
"scripts": {
"build-storybook": "ng run my-project:build-storybook"
}
}
```
8 changes: 0 additions & 8 deletions docs/_snippets/custom-build-script-production.md

This file was deleted.

16 changes: 14 additions & 2 deletions docs/sharing/publish-storybook.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,26 @@ Teams publish Storybook online to review and collaborate on works in progress. T

## Build Storybook as a static web application

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:
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:

{/* prettier-ignore-start */}

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

{/* prettier-ignore-end */}

<If renderer="angular">

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:

{/* prettier-ignore-start */}

<CodeSnippets path="angular-builder-production.md" />

{/* prettier-ignore-end */}

</If>

<Callout variant="info" icon="💡">
You can provide additional flags to customize the command. Read more about the flag options [here](../api/cli-options.mdx).
</Callout>
Expand Down
Loading