-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25658 from storybookjs/docs-cli-versioning
Docs: Document CLI version support (cherry picked from commit 7bbf75f)
- Loading branch information
Showing
6 changed files
with
175 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,10 +22,16 @@ To help ease the pain of keeping Storybook up-to-date, we provide a command-line | |
|
||
<!-- prettier-ignore-end --> | ||
|
||
After running the command the script will: | ||
The `upgrade` command will use whichever version you specify. For example: | ||
|
||
- Upgrade all Storybook packages in your project to the latest stable version | ||
- Run the relevant [automigrations](../migration-guide.md#automatic-upgrade) factoring in the [breaking changes](../migration-guide.md#major-breaking-changes) between your current version and the latest stable version | ||
- `storybook@latest upgrade` will upgrade to the latest version | ||
- `[email protected] upgrade` will upgrade to `7.6.10` | ||
- `storybook@7 upgrade` will upgrade to the newest `7.x.x` version | ||
|
||
After running the command, the script will: | ||
|
||
- Upgrade all Storybook packages in your project to the specified version | ||
- Run the relevant [automigrations](../migration-guide.md#automatic-upgrade) factoring in the [breaking changes](../migration-guide.md#major-breaking-changes) between your current version and the specified version | ||
|
||
<Callout variant="info"> | ||
|
||
|
@@ -69,6 +75,12 @@ To upgrade to the latest pre-release: | |
|
||
<!-- prettier-ignore-end --> | ||
|
||
The `upgrade` command will use whichever version you specify. For example: | ||
|
||
- `storybook@next upgrade` will upgrade to the newest pre-release version | ||
- `[email protected] upgrade` will upgrade to `8.0.0-beta.1` | ||
- `storybook@8 upgrade` will upgrade to the newest `8.x` version | ||
|
||
If you'd like to downgrade to a stable version, manually edit the package version numbers in your `package.json` and re-install. | ||
|
||
<Callout variant="info"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,17 +17,13 @@ Use the Storybook CLI to install it in a single command. Run this inside your _e | |
<!-- prettier-ignore-end --> | ||
|
||
<details> | ||
<summary>Install a specific version</summary> | ||
|
||
<summary><code>storybook init</code> is not made for empty projects</summary> | ||
The `init` command will use whichever version you specify. For example: | ||
|
||
Storybook needs to be installed into a project that is already set up with a framework. It will not work on an empty project. There are many ways to bootstrap an app in a given framework, including: | ||
|
||
- 📦 [Create an Angular Workspace](https://angular.io/cli/new) | ||
- 📦 [Create React App](https://reactjs.org/docs/create-a-new-react-app.html) | ||
- 📦 [Create a Vue App](https://vuejs.org/guide/quick-start.html) | ||
- 📦 [Ember CLI](https://guides.emberjs.com/release/getting-started/quick-start/) | ||
- 📦 [Vite CLI](https://vitejs.dev/guide/#scaffolding-your-first-vite-project) | ||
- Or any other tooling available. | ||
- `storybook@latest init` will initialize the latest version | ||
- `[email protected] init` will initialize `7.6.10` | ||
- `storybook@7 init` will initialize the newest `7.x.x` version | ||
|
||
</details> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
```shell | ||
npx storybook@latest upgrade --prerelease | ||
npx storybook@next upgrade | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
```shell | ||
pnpm dlx storybook@latest upgrade --prerelease | ||
pnpm dlx storybook@next upgrade | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
```shell | ||
yarn dlx storybook@latest upgrade --prerelease | ||
yarn dlx storybook@next upgrade | ||
``` |