@vixt/uni 0.0.7 → 0.0.8
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 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +31 -6
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -3,6 +3,7 @@ import * as _vixt_core from '@vixt/core';
|
|
|
3
3
|
import { AppOptions, PluginOptions, VixtOptions } from '@vixt/core';
|
|
4
4
|
import Uni from '@dcloudio/vite-plugin-uni';
|
|
5
5
|
import Pages from '@uni-helper/vite-plugin-uni-pages';
|
|
6
|
+
import Layouts from '@uni-helper/vite-plugin-uni-layouts';
|
|
6
7
|
import Components from '@uni-helper/vite-plugin-uni-components';
|
|
7
8
|
import AutoImport from 'unplugin-auto-import/vite';
|
|
8
9
|
import UnoCSS from 'unocss/vite';
|
|
@@ -15,7 +16,7 @@ declare module '@vixt/core' {
|
|
|
15
16
|
/** https://github.com/uni-helper/vite-plugin-uni-pages */
|
|
16
17
|
pages?: PluginOptions<typeof Pages>;
|
|
17
18
|
/** https://github.com/uni-helper/vite-plugin-uni-layouts */
|
|
18
|
-
|
|
19
|
+
uniLayouts?: PluginOptions<typeof Layouts>;
|
|
19
20
|
/** https://github.com/uni-helper/vite-plugin-uni-components */
|
|
20
21
|
components?: PluginOptions<typeof Components>;
|
|
21
22
|
/** https://github.com/antfu/unplugin-auto-import */
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as _vixt_core from '@vixt/core';
|
|
|
3
3
|
import { AppOptions, PluginOptions, VixtOptions } from '@vixt/core';
|
|
4
4
|
import Uni from '@dcloudio/vite-plugin-uni';
|
|
5
5
|
import Pages from '@uni-helper/vite-plugin-uni-pages';
|
|
6
|
+
import Layouts from '@uni-helper/vite-plugin-uni-layouts';
|
|
6
7
|
import Components from '@uni-helper/vite-plugin-uni-components';
|
|
7
8
|
import AutoImport from 'unplugin-auto-import/vite';
|
|
8
9
|
import UnoCSS from 'unocss/vite';
|
|
@@ -15,7 +16,7 @@ declare module '@vixt/core' {
|
|
|
15
16
|
/** https://github.com/uni-helper/vite-plugin-uni-pages */
|
|
16
17
|
pages?: PluginOptions<typeof Pages>;
|
|
17
18
|
/** https://github.com/uni-helper/vite-plugin-uni-layouts */
|
|
18
|
-
|
|
19
|
+
uniLayouts?: PluginOptions<typeof Layouts>;
|
|
19
20
|
/** https://github.com/uni-helper/vite-plugin-uni-components */
|
|
20
21
|
components?: PluginOptions<typeof Components>;
|
|
21
22
|
/** https://github.com/antfu/unplugin-auto-import */
|
package/dist/index.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import Uni from '@dcloudio/vite-plugin-uni';
|
|
|
6
6
|
import Pages from '@uni-helper/vite-plugin-uni-pages';
|
|
7
7
|
import Layouts from '@uni-helper/vite-plugin-uni-layouts';
|
|
8
8
|
import Components from '@uni-helper/vite-plugin-uni-components';
|
|
9
|
+
import { uniuseAutoImports } from '@uni-helper/uni-use';
|
|
9
10
|
import AutoImport from 'unplugin-auto-import/vite';
|
|
10
11
|
import UnoCSS from 'unocss/vite';
|
|
11
12
|
import { resolvePathSync } from 'mlly';
|
|
@@ -79,16 +80,33 @@ const presetUni = defineVixtModule({
|
|
|
79
80
|
const defaultOptions = {
|
|
80
81
|
uni: {},
|
|
81
82
|
pages: { dts: `${typesDir}/uni-pages.d.ts` },
|
|
82
|
-
|
|
83
|
+
uniLayouts: {},
|
|
83
84
|
components: {
|
|
84
85
|
dts: `${typesDir}/components.d.ts`,
|
|
85
86
|
dirs: components,
|
|
86
87
|
directoryAsNamespace: true,
|
|
87
88
|
collapseSamePrefixes: true,
|
|
88
|
-
allowOverrides: true
|
|
89
|
+
allowOverrides: true,
|
|
90
|
+
version: 2.7
|
|
89
91
|
},
|
|
90
92
|
imports: {
|
|
91
|
-
imports: [
|
|
93
|
+
imports: [
|
|
94
|
+
"vue",
|
|
95
|
+
"uni-app",
|
|
96
|
+
"pinia",
|
|
97
|
+
{
|
|
98
|
+
"@vueuse/core": [
|
|
99
|
+
// already imported by uni-use
|
|
100
|
+
["tryOnScopeDispose", ""],
|
|
101
|
+
["useNetwork", ""],
|
|
102
|
+
["useOnline", ""],
|
|
103
|
+
["usePreferredDark", ""],
|
|
104
|
+
["useStorage", ""],
|
|
105
|
+
["useStorageAsync", ""]
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
uniuseAutoImports()
|
|
109
|
+
],
|
|
92
110
|
dts: `${typesDir}/auto-imports.d.ts`,
|
|
93
111
|
dirs: [...composables, ...constants, ...stores, ...utils],
|
|
94
112
|
vueTemplate: true
|
|
@@ -98,7 +116,7 @@ const presetUni = defineVixtModule({
|
|
|
98
116
|
const options = defu(vixt.options, defaultOptions);
|
|
99
117
|
const modules = [
|
|
100
118
|
Pages(options.pages),
|
|
101
|
-
Layouts(options.
|
|
119
|
+
Layouts(options.uniLayouts),
|
|
102
120
|
Components(options.components),
|
|
103
121
|
AutoImport(options.imports),
|
|
104
122
|
UnoCSS(options.unocss),
|
|
@@ -149,8 +167,15 @@ const defaults = {
|
|
|
149
167
|
main: "src/main.ts"
|
|
150
168
|
},
|
|
151
169
|
typescript: {
|
|
152
|
-
references: [
|
|
153
|
-
tsConfig: {
|
|
170
|
+
// references: ['types/uni-pages.d.ts', 'types/components.d.ts', 'types/auto-imports.d.ts'],
|
|
171
|
+
tsConfig: {
|
|
172
|
+
compilerOptions: {
|
|
173
|
+
types: ["@dcloudio/types", "@uni-helper/uni-app-types", "@uni-helper/vite-plugin-uni-pages/client"]
|
|
174
|
+
},
|
|
175
|
+
vueCompilerOptions: {
|
|
176
|
+
plugins: ["@uni-helper/uni-app-types/volar-plugin"]
|
|
177
|
+
}
|
|
178
|
+
},
|
|
154
179
|
typeCheck: { vueTsc: true }
|
|
155
180
|
}
|
|
156
181
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixt/uni",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.8",
|
|
5
5
|
"author": "SoulLyoko<https://github.com/SoulLyoko>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/SoulLyoko/vixt#readme",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"@dcloudio/types": "^3.4.8",
|
|
22
22
|
"@uni-helper/eslint-config": "^0.0.6",
|
|
23
23
|
"@uni-helper/uni-app-types": "^0.5.13",
|
|
24
|
+
"@uni-helper/uni-use": "^0.19.12",
|
|
24
25
|
"@uni-helper/unocss-preset-uni": "^0.2.9",
|
|
25
26
|
"@uni-helper/vite-plugin-uni-components": "^0.0.9",
|
|
26
27
|
"@uni-helper/vite-plugin-uni-layouts": "^0.1.10",
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"unocss": "^0.61.0",
|
|
32
33
|
"unplugin-auto-import": "^0.17.6",
|
|
33
34
|
"vue": "^3.4.31",
|
|
34
|
-
"@vixt/core": "0.0.
|
|
35
|
+
"@vixt/core": "0.0.8"
|
|
35
36
|
},
|
|
36
37
|
"scripts": {
|
|
37
38
|
"build": "unbuild"
|