mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-02 05:03:44 +08:00
Merge pull request #18022 from SulthanNK/update-cli-docs
Update: [#17934] CLI docs
This commit is contained in:
commit
0289996d85
@ -21,7 +21,7 @@ title: 'Install Storybook'
|
||||
|
||||
<details>
|
||||
|
||||
<summary><code>sb init</code> is not made for empty projects</summary>
|
||||
<summary><code>storybook init</code> is not made for empty projects</summary>
|
||||
|
||||
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:
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
```shell
|
||||
# Add Storybook:
|
||||
npx sb init
|
||||
npx storybook init
|
||||
```
|
||||
|
||||
- Update your `angular.json` file to include Storybook's custom builder:
|
||||
|
@ -2,7 +2,7 @@ Use the Storybook CLI to install it with a couple of commands. Run this inside y
|
||||
|
||||
```shell
|
||||
# Add Storybook:
|
||||
npx sb init
|
||||
npx storybook init
|
||||
|
||||
# Add Ember storybook adapter
|
||||
ember install @storybook/ember-cli-storybook
|
||||
|
@ -2,7 +2,7 @@ Use the Storybook CLI to install it in a single command. Run this inside your _e
|
||||
|
||||
```shell
|
||||
# Add Storybook:
|
||||
npx sb init --type html
|
||||
npx storybook init --type html
|
||||
```
|
||||
|
||||
If you run into issues with the installation, check the [Troubleshooting section](#troubleshooting) below for guidance on how to solve it.
|
||||
|
@ -2,7 +2,7 @@ Use the Storybook CLI to install it in a single command. Run this inside your _e
|
||||
|
||||
```shell
|
||||
# Add Storybook:
|
||||
npx sb init
|
||||
npx storybook init
|
||||
```
|
||||
|
||||
If you run into issues with the installation, check the [Troubleshooting section](#troubleshooting) below for guidance on how to solve it.
|
||||
|
@ -2,7 +2,7 @@ Use the Storybook CLI to install it in a single command. Run this inside your _e
|
||||
|
||||
```shell
|
||||
# Add Storybook:
|
||||
npx sb init
|
||||
npx storybook init
|
||||
```
|
||||
|
||||
If you run into issues with the installation, check the [Troubleshooting section](#troubleshooting) below for guidance on how to solve it.
|
||||
|
@ -2,7 +2,7 @@ Use the Storybook CLI to install it in a single command. Run this inside your _e
|
||||
|
||||
```shell
|
||||
# Add Storybook:
|
||||
npx sb init
|
||||
npx storybook init
|
||||
```
|
||||
|
||||
If you run into issues with the installation, check the [Troubleshooting section](#troubleshooting) below for guidance on how to solve it.
|
||||
|
@ -2,7 +2,7 @@ Use the Storybook CLI to install it in a single command. Run this inside your _e
|
||||
|
||||
```shell
|
||||
# Add Storybook:
|
||||
npx sb init
|
||||
npx storybook init
|
||||
```
|
||||
|
||||
If you run into issues with the installation, check the [Troubleshooting section](#troubleshooting) below for guidance on how to solve it.
|
||||
|
@ -2,7 +2,7 @@ Use the Storybook CLI to install it in a single command. Run this inside your _e
|
||||
|
||||
```shell
|
||||
# Add Storybook:
|
||||
npx sb init
|
||||
npx storybook init
|
||||
```
|
||||
|
||||
If you run into issues with the installation, check the [Troubleshooting section](#troubleshooting) below for guidance on how to solve it.
|
||||
|
@ -52,7 +52,7 @@ export const webpack5: Fix<Webpack5RunOptions> & CheckBuilder = {
|
||||
|
||||
To upgrade to the latest stable release, run this from your project directory:
|
||||
|
||||
${chalk.cyan('npx sb upgrade')}
|
||||
${chalk.cyan('npx storybook upgrade')}
|
||||
|
||||
Add the ${chalk.cyan('--prerelease')} flag to get the latest prerelease.
|
||||
`.trim()
|
||||
|
@ -52,7 +52,9 @@ export const automigrate = async ({ fixId, dryRun, yes }: FixOptions = {}) => {
|
||||
} else {
|
||||
logger.info(`Skipping the ${chalk.cyan(f.id)} fix.`);
|
||||
logger.info();
|
||||
logger.info(`If you change your mind, run '${chalk.cyan('npx sb@next automigrate')}'`);
|
||||
logger.info(
|
||||
`If you change your mind, run '${chalk.cyan('npx storybook@next automigrate')}'`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ export function createUpdateMessage(updateInfo: VersionCheck, version: string):
|
||||
|
||||
try {
|
||||
const suffix = semver.prerelease(updateInfo.data.latest.version) ? '--prerelease' : '';
|
||||
const upgradeCommand = `npx sb@latest upgrade ${suffix}`.trim();
|
||||
const upgradeCommand = `npx storybook@latest upgrade ${suffix}`.trim();
|
||||
updateMessage =
|
||||
updateInfo.success && semver.lt(version, updateInfo.data.latest.version)
|
||||
? dedent`
|
||||
|
Loading…
x
Reference in New Issue
Block a user