@vueless/storybook 0.0.30 → 0.0.32
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/.storybook/preview.js +7 -12
- package/package.json +1 -1
package/.storybook/preview.js
CHANGED
|
@@ -10,18 +10,15 @@ import { createRouter, createWebHistory } from "vue-router";
|
|
|
10
10
|
// Tailwind styles
|
|
11
11
|
import "./index.pcss";
|
|
12
12
|
|
|
13
|
-
// Create vueless instance
|
|
14
|
-
const vueless = createVueless();
|
|
15
|
-
|
|
16
|
-
const router = createRouter({
|
|
17
|
-
history: createWebHistory(import.meta.env.VITE_BASE_PATH),
|
|
18
|
-
routes: [{ path: "/" }],
|
|
19
|
-
});
|
|
20
|
-
|
|
21
13
|
// Create storybook app instance
|
|
22
14
|
const storybookApp = (app) => {
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
const vueless = createVueless();
|
|
16
|
+
const router = createRouter({ history: createWebHistory(), routes: [] });
|
|
17
|
+
|
|
18
|
+
if (!app._context.config.globalProperties.$route) {
|
|
19
|
+
app.use(router);
|
|
20
|
+
app.use(vueless);
|
|
21
|
+
}
|
|
25
22
|
};
|
|
26
23
|
|
|
27
24
|
// Setup storybook
|
|
@@ -36,8 +33,6 @@ export default {
|
|
|
36
33
|
backgrounds,
|
|
37
34
|
options: {
|
|
38
35
|
storySort: (a, b) => {
|
|
39
|
-
if (!a.type === "docs") return;
|
|
40
|
-
|
|
41
36
|
const idA = a.id.split("--")[0];
|
|
42
37
|
const idB = b.id.split("--")[0];
|
|
43
38
|
|