@vixt/vue 0.1.11 → 0.1.13
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/dist/index.d.mts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.mjs +2 -19
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
2
|
import * as _vixt_core from '@vixt/core';
|
|
3
3
|
import { PluginOptions, VixtOptions } from '@vixt/core';
|
|
4
|
-
import { TreeNode } from 'unplugin-vue-router';
|
|
5
4
|
import { RouterOptions } from 'vue-router';
|
|
6
5
|
import { PersistedStateFactoryOptions } from 'pinia-plugin-persistedstate';
|
|
7
6
|
import Vue from '@vitejs/plugin-vue';
|
|
@@ -33,14 +32,13 @@ declare module '@vixt/core' {
|
|
|
33
32
|
}
|
|
34
33
|
declare module '@vixt/core/client' {
|
|
35
34
|
interface VixtAppConfig {
|
|
36
|
-
router?: RouterOptions
|
|
35
|
+
router?: Partial<RouterOptions>;
|
|
37
36
|
/** https://github.com/prazdevs/pinia-plugin-persistedstate */
|
|
38
37
|
piniaPersistedState?: PersistedStateFactoryOptions;
|
|
39
38
|
}
|
|
40
39
|
}
|
|
41
|
-
declare function normalizeRouteName(route: TreeNode['value'], name?: string): string;
|
|
42
40
|
declare const presetVue: _vixt_core.VixtModule<VixtOptions>;
|
|
43
41
|
|
|
44
42
|
declare const _default: (options?: VixtOptions | undefined) => vite.PluginOption;
|
|
45
43
|
|
|
46
|
-
export { _default as default,
|
|
44
|
+
export { _default as default, presetVue };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
2
|
import * as _vixt_core from '@vixt/core';
|
|
3
3
|
import { PluginOptions, VixtOptions } from '@vixt/core';
|
|
4
|
-
import { TreeNode } from 'unplugin-vue-router';
|
|
5
4
|
import { RouterOptions } from 'vue-router';
|
|
6
5
|
import { PersistedStateFactoryOptions } from 'pinia-plugin-persistedstate';
|
|
7
6
|
import Vue from '@vitejs/plugin-vue';
|
|
@@ -33,14 +32,13 @@ declare module '@vixt/core' {
|
|
|
33
32
|
}
|
|
34
33
|
declare module '@vixt/core/client' {
|
|
35
34
|
interface VixtAppConfig {
|
|
36
|
-
router?: RouterOptions
|
|
35
|
+
router?: Partial<RouterOptions>;
|
|
37
36
|
/** https://github.com/prazdevs/pinia-plugin-persistedstate */
|
|
38
37
|
piniaPersistedState?: PersistedStateFactoryOptions;
|
|
39
38
|
}
|
|
40
39
|
}
|
|
41
|
-
declare function normalizeRouteName(route: TreeNode['value'], name?: string): string;
|
|
42
40
|
declare const presetVue: _vixt_core.VixtModule<VixtOptions>;
|
|
43
41
|
|
|
44
42
|
declare const _default: (options?: VixtOptions | undefined) => vite.PluginOption;
|
|
45
43
|
|
|
46
|
-
export { _default as default,
|
|
44
|
+
export { _default as default, presetVue };
|
package/dist/index.mjs
CHANGED
|
@@ -9,30 +9,13 @@ import VueRouter from 'unplugin-vue-router/vite';
|
|
|
9
9
|
import { VueRouterAutoImports } from 'unplugin-vue-router';
|
|
10
10
|
import UnoCSS from 'unocss/vite';
|
|
11
11
|
|
|
12
|
-
function normalizeRouteName(route, name = "") {
|
|
13
|
-
if (route.rawSegment && route.rawSegment !== "index") {
|
|
14
|
-
name = name ? `${route.rawSegment}-${name}` : route.rawSegment;
|
|
15
|
-
}
|
|
16
|
-
if (route.parent) {
|
|
17
|
-
name = normalizeRouteName(route.parent, name);
|
|
18
|
-
}
|
|
19
|
-
return name.replace(/\[|\]|\.\.\./g, "");
|
|
20
|
-
}
|
|
21
12
|
const presetVue = defineVixtModule({
|
|
22
13
|
async setup(_, vixt) {
|
|
23
14
|
const { components, composables = [], constants = [], utils = [], stores = [], pages, layouts } = resolveLayersDirs(vixt._layers, vixt.options);
|
|
24
15
|
const { buildTypesDir, buildImportsDir } = vixt.options;
|
|
25
16
|
const defaultOptions = {
|
|
26
17
|
vue: {},
|
|
27
|
-
router: {
|
|
28
|
-
dts: `${buildTypesDir}/typed-router.d.ts`,
|
|
29
|
-
routesFolder: pages,
|
|
30
|
-
getRouteName(route) {
|
|
31
|
-
if (route.path === "/")
|
|
32
|
-
return "index";
|
|
33
|
-
return normalizeRouteName(route.value);
|
|
34
|
-
}
|
|
35
|
-
},
|
|
18
|
+
router: { dts: `${buildTypesDir}/typed-router.d.ts`, routesFolder: pages },
|
|
36
19
|
layouts: { layoutsDirs: layouts?.reverse(), pagesDirs: pages },
|
|
37
20
|
components: {
|
|
38
21
|
dts: `${buildTypesDir}/components.d.ts`,
|
|
@@ -105,4 +88,4 @@ app.mount('#${app.rootId}')
|
|
|
105
88
|
};
|
|
106
89
|
const index = createVixtPlugin({ defaults });
|
|
107
90
|
|
|
108
|
-
export { index as default,
|
|
91
|
+
export { index as default, presetVue };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixt/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.13",
|
|
5
5
|
"author": "SoulLyoko<https://github.com/SoulLyoko>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/SoulLyoko/vixt#readme",
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@vitejs/plugin-vue": "^5.1.2",
|
|
22
22
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
|
23
|
-
"@vueuse/core": "^11.0.
|
|
23
|
+
"@vueuse/core": "^11.0.3",
|
|
24
24
|
"pinia": "^2.2.2",
|
|
25
25
|
"pinia-plugin-persistedstate": "^3.2.1",
|
|
26
|
-
"unocss": "0.61.
|
|
26
|
+
"unocss": "0.61.6",
|
|
27
27
|
"unplugin-auto-import": "^0.18.2",
|
|
28
28
|
"unplugin-vue-components": "^0.27.4",
|
|
29
29
|
"unplugin-vue-router": "^0.10.7",
|
|
30
|
-
"vite-plugin-vue-devtools": "^7.3.
|
|
30
|
+
"vite-plugin-vue-devtools": "^7.3.9",
|
|
31
31
|
"vite-plugin-vue-layouts": "^0.11.0",
|
|
32
32
|
"vue": "^3.4.38",
|
|
33
33
|
"vue-router": "^4.4.3",
|
|
34
|
-
"@vixt/core": "0.1.
|
|
34
|
+
"@vixt/core": "0.1.13"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "unbuild"
|