@storybook/addon-onboarding 0.0.22--canary.35a9153.0 → 0.0.22--canary.43.3f0e1eb.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 +44 -32
- package/dist/manager.js +63 -63
- package/dist/manager.js.map +1 -1
- package/dist/manager.mjs +57 -57
- package/dist/manager.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,50 +1,62 @@
|
|
|
1
1
|
# Storybook Addon Addon Onboarding
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Storybook Addon Onboarding - Introduces a new onboarding experience
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### Development scripts
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- `yarn start` runs tsup in watch mode and starts Storybook
|
|
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
|
|
8
10
|
|
|
9
|
-
|
|
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.
|
|
11
|
+
## Release Management
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
### Setup
|
|
13
14
|
|
|
14
|
-
This
|
|
15
|
+
This project is configured to use [auto](https://github.com/intuit/auto) for release management. It generates a changelog and pushes it to both GitHub and npm. Therefore, you need to configure access to both:
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
- [`NPM_TOKEN`](https://docs.npmjs.com/creating-and-viewing-access-tokens#creating-access-tokens) Create a token with both _Read and Publish_ permissions.
|
|
18
|
+
- [`GH_TOKEN`](https://github.com/settings/tokens) Create a token with the `repo` scope.
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
Then open your `package.json` and edit the following fields:
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
- `name`
|
|
23
|
+
- `author`
|
|
24
|
+
- `repository`
|
|
25
|
+
|
|
26
|
+
#### Local
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
To use `auto` locally create a `.env` file at the root of your project and add your tokens to it:
|
|
25
29
|
|
|
26
|
-
```
|
|
27
|
-
|
|
30
|
+
```bash
|
|
31
|
+
GH_TOKEN=<value you just got from GitHub>
|
|
32
|
+
NPM_TOKEN=<value you just got from npm>
|
|
28
33
|
```
|
|
29
34
|
|
|
30
|
-
|
|
35
|
+
Lastly, **create labels on GitHub**. You’ll use these labels in the future when making changes to the package.
|
|
31
36
|
|
|
32
|
-
```
|
|
33
|
-
|
|
37
|
+
```bash
|
|
38
|
+
npx auto create-labels
|
|
34
39
|
```
|
|
35
40
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
If you check on GitHub, you’ll now see a set of labels that `auto` would like you to use. Use these to tag future pull requests.
|
|
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.
|
|
46
|
+
|
|
47
|
+
Go to `Settings > Secrets`, click `New repository secret`, and add your `NPM_TOKEN`.
|
|
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
|
|
50
55
|
```
|
|
56
|
+
|
|
57
|
+
That will:
|
|
58
|
+
|
|
59
|
+
- Build and package the addon code
|
|
60
|
+
- Bump the version
|
|
61
|
+
- Push a release to GitHub and npm
|
|
62
|
+
- Push a changelog to GitHub
|