@storybook/vue3-webpack5 7.0.0-beta.46 → 7.0.0-beta.47
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 +10 -9
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Storybook for Vue 3
|
|
1
|
+
# Storybook for Vue 3 and Webpack
|
|
2
2
|
|
|
3
3
|
Storybook for Vue 3 is a UI development environment for your Vue 3 components.
|
|
4
4
|
With it, you can visualize different states of your UI components and develop them interactively.
|
|
@@ -24,20 +24,21 @@ You can also build a [static version](https://storybook.js.org/docs/vue/sharing/
|
|
|
24
24
|
|
|
25
25
|
## Extending the Vue application
|
|
26
26
|
|
|
27
|
-
Storybook creates a [Vue 3 application](https://v3.vuejs.org/api/application-api.html#application-api) for your component preview
|
|
28
|
-
|
|
27
|
+
Storybook creates a [Vue 3 application](https://v3.vuejs.org/api/application-api.html#application-api) for your component preview.
|
|
29
28
|
When using global custom components (`app.component`), directives (`app.directive`), extensions (`app.use`), or other application methods, you will need to configure those in the `./storybook/preview.js` file.
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
Therefore, Storybook provides you with a `setup` function exported from this package, which receives as a callback your Storybook instance, which you can interact with and add your custom configuration.
|
|
32
31
|
|
|
33
32
|
```js
|
|
34
33
|
// .storybook/preview.js
|
|
35
34
|
|
|
36
|
-
import {
|
|
35
|
+
import { setup } from '@storybook/vue3';
|
|
37
36
|
|
|
38
|
-
app
|
|
39
|
-
app.
|
|
40
|
-
app.
|
|
41
|
-
|
|
37
|
+
setup((app) => {
|
|
38
|
+
app.use(MyPlugin);
|
|
39
|
+
app.component('my-component', MyComponent);
|
|
40
|
+
app.mixin({
|
|
41
|
+
/* My mixin */
|
|
42
|
+
});
|
|
42
43
|
});
|
|
43
44
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/vue3-webpack5",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.47",
|
|
4
4
|
"description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"prep": "../../../scripts/prepare/bundle.ts"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@storybook/builder-webpack5": "7.0.0-beta.
|
|
52
|
-
"@storybook/core-common": "7.0.0-beta.
|
|
53
|
-
"@storybook/preset-vue3-webpack": "7.0.0-beta.
|
|
54
|
-
"@storybook/vue3": "7.0.0-beta.
|
|
51
|
+
"@storybook/builder-webpack5": "7.0.0-beta.47",
|
|
52
|
+
"@storybook/core-common": "7.0.0-beta.47",
|
|
53
|
+
"@storybook/preset-vue3-webpack": "7.0.0-beta.47",
|
|
54
|
+
"@storybook/vue3": "7.0.0-beta.47",
|
|
55
55
|
"@types/node": "^16.0.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
],
|
|
81
81
|
"platform": "node"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "a591d8eb579e68b26c277ab8ebdcafc2611530a5"
|
|
84
84
|
}
|