@storybook/addon-onboarding 0.0.22--canary.43.3f0e1eb.0 → 0.0.23--canary.44.74f2d86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -44
- package/dist/manager.js +61 -61
- package/dist/manager.js.map +1 -1
- package/dist/manager.mjs +56 -56
- package/dist/manager.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,62 +1,50 @@
|
|
|
1
1
|
# Storybook Addon Addon Onboarding
|
|
2
2
|
|
|
3
|
-
Storybook
|
|
3
|
+
This addon provides a guided tour in some of Storybook's features, helping you get to know about the basics of Storybook and learn how to write stories!
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+

|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- `yarn build` build and package your addon code
|
|
9
|
-
- `yarn storybook:watch` runs nodemon in watch mode so it reruns Storybook on changes. This is useful when testing the actual addon (as we cannot have HMR for addon changes) rather than just stories in Storybook
|
|
7
|
+
## Triggering the onboarding
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
This addon comes installed by default in Storybook projects and should trigger automatically.
|
|
10
|
+
If you want to retrigger the addon, you should make sure that your Storybook still contains the example stories that come when initializing Storybook, and you can then navigate to http://localhost:6006/?path=/onboarding after running Storybook.
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
## Uninstalling
|
|
14
13
|
|
|
15
|
-
This
|
|
14
|
+
This addon serves to provide you a guided experience on the basics of Storybook. Once you are done, the addon is therefore not needed anymore and will not get activated (unless triggered manually), so you can freely remove it. Here's how to do so:
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
- [`GH_TOKEN`](https://github.com/settings/tokens) Create a token with the `repo` scope.
|
|
16
|
+
### 1. Remove the dependency
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
yarn:
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
- `repository`
|
|
25
|
-
|
|
26
|
-
#### Local
|
|
27
|
-
|
|
28
|
-
To use `auto` locally create a `.env` file at the root of your project and add your tokens to it:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
GH_TOKEN=<value you just got from GitHub>
|
|
32
|
-
NPM_TOKEN=<value you just got from npm>
|
|
20
|
+
```zsh
|
|
21
|
+
yarn remove -D @storybook/addon-onboarding
|
|
33
22
|
```
|
|
34
23
|
|
|
35
|
-
|
|
24
|
+
npm:
|
|
36
25
|
|
|
37
|
-
```
|
|
38
|
-
|
|
26
|
+
```zsh
|
|
27
|
+
npm uninstall -D @storybook/addon-onboarding
|
|
39
28
|
```
|
|
40
29
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
#### GitHub Actions
|
|
44
|
-
|
|
45
|
-
This template comes with GitHub actions already set up to publish your addon anytime someone pushes to your repository.
|
|
30
|
+
pnpm:
|
|
46
31
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
### Creating a release
|
|
50
|
-
|
|
51
|
-
To create a release locally you can run the following command, otherwise the GitHub action will make the release for you.
|
|
52
|
-
|
|
53
|
-
```sh
|
|
54
|
-
yarn release
|
|
32
|
+
```zsh
|
|
33
|
+
pnpm remove -D @storybook/addon-onboarding
|
|
55
34
|
```
|
|
56
35
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
36
|
+
### 2. Remove the addon in your `.storybook/main.js` file
|
|
37
|
+
|
|
38
|
+
```diff
|
|
39
|
+
const config = {
|
|
40
|
+
stories: [
|
|
41
|
+
"../stories/**/*.stories.mdx",
|
|
42
|
+
"../stories/**/*.stories.@(js|jsx|ts|tsx)",
|
|
43
|
+
],
|
|
44
|
+
addons: [
|
|
45
|
+
"@storybook/addon-essentials",
|
|
46
|
+
- "@storybook/addon-onboarding"
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
export default config;
|
|
50
|
+
```
|