@vixt/uni 0.3.6 → 0.4.1
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 +30 -13
- package/dist/index.d.ts +30 -13
- package/dist/index.mjs +7 -4
- package/package.json +5 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,38 +1,54 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
2
|
import * as _vixt_core from '@vixt/core';
|
|
3
|
-
import { Vixt, PluginOptions, VixtOptions } from '@vixt/core';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { AppOptions, Vixt, PluginOptions as PluginOptions$1, VixtOptions } from '@vixt/core';
|
|
4
|
+
import Pages, { PageMetaDatum } from '@uni-helper/vite-plugin-uni-pages';
|
|
5
|
+
import { Pinia } from 'pinia';
|
|
6
|
+
import { PluginOptions } from 'pinia-plugin-persistedstate';
|
|
7
|
+
import { App } from 'vue';
|
|
6
8
|
import Uni from '@dcloudio/vite-plugin-uni';
|
|
7
9
|
import Components from '@uni-helper/vite-plugin-uni-components';
|
|
8
10
|
import Layouts from '@uni-helper/vite-plugin-uni-layouts';
|
|
9
|
-
import Pages from '@uni-helper/vite-plugin-uni-pages';
|
|
10
11
|
import UnoCSS from 'unocss/vite';
|
|
11
12
|
import AutoImport from 'unplugin-auto-import/vite';
|
|
12
13
|
import { ImportsMap } from 'unplugin-auto-import/types';
|
|
13
14
|
|
|
14
|
-
declare
|
|
15
|
+
declare module '@vixt/core/client' {
|
|
16
|
+
interface VixtAppConfig {
|
|
17
|
+
/** https://github.com/prazdevs/pinia-plugin-persistedstate */
|
|
18
|
+
piniaPersistedState?: PluginOptions
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface VixtApp {
|
|
22
|
+
app: App
|
|
23
|
+
routes: PageMetaDatum[]
|
|
24
|
+
pinia: Pinia
|
|
25
|
+
appConfig: VixtAppConfig
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
15
29
|
declare const appUni: _vixt_core.VixtModule<AppOptions>;
|
|
16
30
|
|
|
31
|
+
declare function generateMainTs(options: AppOptions, vixt: Vixt): string;
|
|
32
|
+
|
|
17
33
|
declare module '@vixt/core' {
|
|
18
34
|
interface VixtOptions {
|
|
19
|
-
uni?: PluginOptions<typeof Uni>;
|
|
35
|
+
uni?: PluginOptions$1<typeof Uni>;
|
|
20
36
|
/** https://github.com/uni-helper/vite-plugin-uni-pages */
|
|
21
|
-
uniPages?: PluginOptions<typeof Pages>;
|
|
37
|
+
uniPages?: PluginOptions$1<typeof Pages>;
|
|
22
38
|
/** https://github.com/uni-helper/vite-plugin-uni-layouts */
|
|
23
|
-
uniLayouts?: PluginOptions<typeof Layouts>;
|
|
39
|
+
uniLayouts?: PluginOptions$1<typeof Layouts>;
|
|
24
40
|
/** https://github.com/uni-helper/vite-plugin-uni-components */
|
|
25
|
-
uniComponents?: PluginOptions<typeof Components>;
|
|
41
|
+
uniComponents?: PluginOptions$1<typeof Components>;
|
|
26
42
|
/** https://github.com/antfu/unplugin-auto-import */
|
|
27
|
-
imports?: PluginOptions<typeof AutoImport>;
|
|
43
|
+
imports?: PluginOptions$1<typeof AutoImport>;
|
|
28
44
|
/** https://github.com/antfu/unocss */
|
|
29
|
-
unocss?: PluginOptions<typeof UnoCSS>;
|
|
45
|
+
unocss?: PluginOptions$1<typeof UnoCSS>;
|
|
30
46
|
}
|
|
31
47
|
}
|
|
32
48
|
declare module '@vixt/core/client' {
|
|
33
49
|
interface VixtAppConfig {
|
|
34
50
|
/** https://github.com/prazdevs/pinia-plugin-persistedstate */
|
|
35
|
-
piniaPersistedState?: PluginOptions
|
|
51
|
+
piniaPersistedState?: PluginOptions;
|
|
36
52
|
}
|
|
37
53
|
}
|
|
38
54
|
declare const presetUni: _vixt_core.VixtModule<VixtOptions>;
|
|
@@ -58,4 +74,5 @@ declare function useImports(): ImportsMap;
|
|
|
58
74
|
|
|
59
75
|
declare const _default: (options?: _vixt_core.VixtOptions | undefined) => vite.PluginOption;
|
|
60
76
|
|
|
61
|
-
export {
|
|
77
|
+
export { appUni, _default as default, generateMainTs, patchNormalizeNodeModules, presetUni, uniModules, uniPatch, useImports, vueusePolyfill };
|
|
78
|
+
export type { ModuleOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,38 +1,54 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
2
|
import * as _vixt_core from '@vixt/core';
|
|
3
|
-
import { Vixt, PluginOptions, VixtOptions } from '@vixt/core';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { AppOptions, Vixt, PluginOptions as PluginOptions$1, VixtOptions } from '@vixt/core';
|
|
4
|
+
import Pages, { PageMetaDatum } from '@uni-helper/vite-plugin-uni-pages';
|
|
5
|
+
import { Pinia } from 'pinia';
|
|
6
|
+
import { PluginOptions } from 'pinia-plugin-persistedstate';
|
|
7
|
+
import { App } from 'vue';
|
|
6
8
|
import Uni from '@dcloudio/vite-plugin-uni';
|
|
7
9
|
import Components from '@uni-helper/vite-plugin-uni-components';
|
|
8
10
|
import Layouts from '@uni-helper/vite-plugin-uni-layouts';
|
|
9
|
-
import Pages from '@uni-helper/vite-plugin-uni-pages';
|
|
10
11
|
import UnoCSS from 'unocss/vite';
|
|
11
12
|
import AutoImport from 'unplugin-auto-import/vite';
|
|
12
13
|
import { ImportsMap } from 'unplugin-auto-import/types';
|
|
13
14
|
|
|
14
|
-
declare
|
|
15
|
+
declare module '@vixt/core/client' {
|
|
16
|
+
interface VixtAppConfig {
|
|
17
|
+
/** https://github.com/prazdevs/pinia-plugin-persistedstate */
|
|
18
|
+
piniaPersistedState?: PluginOptions
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface VixtApp {
|
|
22
|
+
app: App
|
|
23
|
+
routes: PageMetaDatum[]
|
|
24
|
+
pinia: Pinia
|
|
25
|
+
appConfig: VixtAppConfig
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
15
29
|
declare const appUni: _vixt_core.VixtModule<AppOptions>;
|
|
16
30
|
|
|
31
|
+
declare function generateMainTs(options: AppOptions, vixt: Vixt): string;
|
|
32
|
+
|
|
17
33
|
declare module '@vixt/core' {
|
|
18
34
|
interface VixtOptions {
|
|
19
|
-
uni?: PluginOptions<typeof Uni>;
|
|
35
|
+
uni?: PluginOptions$1<typeof Uni>;
|
|
20
36
|
/** https://github.com/uni-helper/vite-plugin-uni-pages */
|
|
21
|
-
uniPages?: PluginOptions<typeof Pages>;
|
|
37
|
+
uniPages?: PluginOptions$1<typeof Pages>;
|
|
22
38
|
/** https://github.com/uni-helper/vite-plugin-uni-layouts */
|
|
23
|
-
uniLayouts?: PluginOptions<typeof Layouts>;
|
|
39
|
+
uniLayouts?: PluginOptions$1<typeof Layouts>;
|
|
24
40
|
/** https://github.com/uni-helper/vite-plugin-uni-components */
|
|
25
|
-
uniComponents?: PluginOptions<typeof Components>;
|
|
41
|
+
uniComponents?: PluginOptions$1<typeof Components>;
|
|
26
42
|
/** https://github.com/antfu/unplugin-auto-import */
|
|
27
|
-
imports?: PluginOptions<typeof AutoImport>;
|
|
43
|
+
imports?: PluginOptions$1<typeof AutoImport>;
|
|
28
44
|
/** https://github.com/antfu/unocss */
|
|
29
|
-
unocss?: PluginOptions<typeof UnoCSS>;
|
|
45
|
+
unocss?: PluginOptions$1<typeof UnoCSS>;
|
|
30
46
|
}
|
|
31
47
|
}
|
|
32
48
|
declare module '@vixt/core/client' {
|
|
33
49
|
interface VixtAppConfig {
|
|
34
50
|
/** https://github.com/prazdevs/pinia-plugin-persistedstate */
|
|
35
|
-
piniaPersistedState?: PluginOptions
|
|
51
|
+
piniaPersistedState?: PluginOptions;
|
|
36
52
|
}
|
|
37
53
|
}
|
|
38
54
|
declare const presetUni: _vixt_core.VixtModule<VixtOptions>;
|
|
@@ -58,4 +74,5 @@ declare function useImports(): ImportsMap;
|
|
|
58
74
|
|
|
59
75
|
declare const _default: (options?: _vixt_core.VixtOptions | undefined) => vite.PluginOption;
|
|
60
76
|
|
|
61
|
-
export {
|
|
77
|
+
export { appUni, _default as default, generateMainTs, patchNormalizeNodeModules, presetUni, uniModules, uniPatch, useImports, vueusePolyfill };
|
|
78
|
+
export type { ModuleOptions };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineVixtModule, resolveLayersDirs, defineVitePlugin, createVixtPlugin } from '@vixt/core';
|
|
2
|
-
import { generateIndexHtml, genarateAppComponent, generateCss, generateAppConfig, generatePlugins } from '@vixt/vue';
|
|
3
|
-
import fs from 'fs-extra';
|
|
1
|
+
import { generateClient, generateCss, generateAppConfig, generatePlugins, defineVixtModule, generateIndexHtml, resolveLayersDirs, defineVitePlugin, createVixtPlugin } from '@vixt/core';
|
|
4
2
|
import path from 'pathe';
|
|
3
|
+
import { genarateAppComponent } from '@vixt/vue';
|
|
4
|
+
import fs from 'fs-extra';
|
|
5
5
|
import Uni from '@dcloudio/vite-plugin-uni';
|
|
6
6
|
import Components from '@uni-helper/vite-plugin-uni-components';
|
|
7
7
|
import Layouts from '@uni-helper/vite-plugin-uni-layouts';
|
|
@@ -22,6 +22,7 @@ function generateMainTs(options, vixt) {
|
|
|
22
22
|
fs.outputFileSync(mainTsPath, `// Generated by Vixt
|
|
23
23
|
// This file transform from '${path.basename(buildDir)}/main.ts'
|
|
24
24
|
`);
|
|
25
|
+
generateClient(vixt);
|
|
25
26
|
const appComponentTemplate = genarateAppComponent(vixt);
|
|
26
27
|
const cssTemplate = generateCss(options);
|
|
27
28
|
const appConfigTemplate = generateAppConfig(vixt);
|
|
@@ -59,11 +60,13 @@ export function createApp() {
|
|
|
59
60
|
fs.outputFileSync(path.resolve(buildDir, "main.ts"), code);
|
|
60
61
|
return code;
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
+
|
|
64
|
+
const name$2 = "vixt:app-uni";
|
|
63
65
|
const defaults$1 = {
|
|
64
66
|
rootId: "app",
|
|
65
67
|
rootTag: "div",
|
|
66
68
|
baseURL: "/",
|
|
69
|
+
entryFile: "main.ts",
|
|
67
70
|
css: [],
|
|
68
71
|
head: {
|
|
69
72
|
meta: [
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixt/uni",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.1",
|
|
5
5
|
"author": "SoulLyoko<https://github.com/SoulLyoko>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/SoulLyoko/vixt#readme",
|
|
@@ -26,10 +26,11 @@
|
|
|
26
26
|
"@uni-helper/vite-plugin-uni-layouts": "^0.1.10",
|
|
27
27
|
"@uni-helper/vite-plugin-uni-pages": "^0.2.28",
|
|
28
28
|
"unocss-applet": "^0.10.0",
|
|
29
|
-
"@vixt/core": "0.
|
|
30
|
-
"@vixt/vue": "0.
|
|
29
|
+
"@vixt/core": "0.4.1",
|
|
30
|
+
"@vixt/vue": "0.4.1"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
|
-
"build": "unbuild"
|
|
33
|
+
"build": "unbuild",
|
|
34
|
+
"dev": "unbuild --stub"
|
|
34
35
|
}
|
|
35
36
|
}
|