@vixt/vitepress 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 +22 -14
- package/dist/index.d.ts +22 -14
- package/dist/index.mjs +9 -6
- package/package.json +5 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,36 +1,44 @@
|
|
|
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 { PluginOptions
|
|
3
|
+
import { AppOptions, Vixt, PluginOptions as PluginOptions$1, VixtOptions } from '@vixt/core';
|
|
4
|
+
import { Pinia } from 'pinia';
|
|
5
|
+
import { PluginOptions } from 'pinia-plugin-persistedstate';
|
|
6
|
+
import { EnhanceAppContext } from 'vitepress';
|
|
6
7
|
import UnoCSS from 'unocss/vite';
|
|
7
8
|
import AutoImport from 'unplugin-auto-import/vite';
|
|
8
9
|
import Components from 'unplugin-vue-components/vite';
|
|
9
10
|
import VueDevTools from 'vite-plugin-vue-devtools';
|
|
10
11
|
|
|
11
|
-
declare
|
|
12
|
+
declare module '@vixt/core/client' {
|
|
13
|
+
interface VixtAppConfig {
|
|
14
|
+
/** https://github.com/prazdevs/pinia-plugin-persistedstate */
|
|
15
|
+
piniaPersistedState?: PluginOptions
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface VixtApp extends EnhanceAppContext {
|
|
19
|
+
pinia: Pinia
|
|
20
|
+
appConfig: VixtAppConfig
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
12
24
|
declare const appVitepress: _vixt_core.VixtModule<AppOptions>;
|
|
13
25
|
|
|
26
|
+
declare function generateMainTs(options: AppOptions, vixt: Vixt): string;
|
|
27
|
+
|
|
14
28
|
declare module '@vixt/core' {
|
|
15
29
|
interface VixtOptions {
|
|
16
30
|
/** https://github.com/antfu/unplugin-vue-components */
|
|
17
|
-
components?: PluginOptions<typeof Components>;
|
|
31
|
+
components?: PluginOptions$1<typeof Components>;
|
|
18
32
|
/** https://github.com/antfu/unplugin-auto-import */
|
|
19
|
-
imports?: PluginOptions<typeof AutoImport>;
|
|
33
|
+
imports?: PluginOptions$1<typeof AutoImport>;
|
|
20
34
|
/** https://github.com/antfu/unocss */
|
|
21
|
-
unocss?: PluginOptions<typeof UnoCSS>;
|
|
35
|
+
unocss?: PluginOptions$1<typeof UnoCSS>;
|
|
22
36
|
/** https://github.com/webfansplz/vite-plugin-vue-devtools */
|
|
23
|
-
devtools?: PluginOptions<typeof VueDevTools> & {
|
|
37
|
+
devtools?: PluginOptions$1<typeof VueDevTools> & {
|
|
24
38
|
enabled?: boolean;
|
|
25
39
|
};
|
|
26
40
|
}
|
|
27
41
|
}
|
|
28
|
-
declare module '@vixt/core/client' {
|
|
29
|
-
interface VixtAppConfig {
|
|
30
|
-
/** https://github.com/prazdevs/pinia-plugin-persistedstate */
|
|
31
|
-
piniaPersistedState?: PluginOptions$1;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
42
|
declare const presetVitepress: _vixt_core.VixtModule<VixtOptions>;
|
|
35
43
|
|
|
36
44
|
declare const _default: (options?: VixtOptions | undefined) => vite.PluginOption;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,36 +1,44 @@
|
|
|
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 { PluginOptions
|
|
3
|
+
import { AppOptions, Vixt, PluginOptions as PluginOptions$1, VixtOptions } from '@vixt/core';
|
|
4
|
+
import { Pinia } from 'pinia';
|
|
5
|
+
import { PluginOptions } from 'pinia-plugin-persistedstate';
|
|
6
|
+
import { EnhanceAppContext } from 'vitepress';
|
|
6
7
|
import UnoCSS from 'unocss/vite';
|
|
7
8
|
import AutoImport from 'unplugin-auto-import/vite';
|
|
8
9
|
import Components from 'unplugin-vue-components/vite';
|
|
9
10
|
import VueDevTools from 'vite-plugin-vue-devtools';
|
|
10
11
|
|
|
11
|
-
declare
|
|
12
|
+
declare module '@vixt/core/client' {
|
|
13
|
+
interface VixtAppConfig {
|
|
14
|
+
/** https://github.com/prazdevs/pinia-plugin-persistedstate */
|
|
15
|
+
piniaPersistedState?: PluginOptions
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface VixtApp extends EnhanceAppContext {
|
|
19
|
+
pinia: Pinia
|
|
20
|
+
appConfig: VixtAppConfig
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
12
24
|
declare const appVitepress: _vixt_core.VixtModule<AppOptions>;
|
|
13
25
|
|
|
26
|
+
declare function generateMainTs(options: AppOptions, vixt: Vixt): string;
|
|
27
|
+
|
|
14
28
|
declare module '@vixt/core' {
|
|
15
29
|
interface VixtOptions {
|
|
16
30
|
/** https://github.com/antfu/unplugin-vue-components */
|
|
17
|
-
components?: PluginOptions<typeof Components>;
|
|
31
|
+
components?: PluginOptions$1<typeof Components>;
|
|
18
32
|
/** https://github.com/antfu/unplugin-auto-import */
|
|
19
|
-
imports?: PluginOptions<typeof AutoImport>;
|
|
33
|
+
imports?: PluginOptions$1<typeof AutoImport>;
|
|
20
34
|
/** https://github.com/antfu/unocss */
|
|
21
|
-
unocss?: PluginOptions<typeof UnoCSS>;
|
|
35
|
+
unocss?: PluginOptions$1<typeof UnoCSS>;
|
|
22
36
|
/** https://github.com/webfansplz/vite-plugin-vue-devtools */
|
|
23
|
-
devtools?: PluginOptions<typeof VueDevTools> & {
|
|
37
|
+
devtools?: PluginOptions$1<typeof VueDevTools> & {
|
|
24
38
|
enabled?: boolean;
|
|
25
39
|
};
|
|
26
40
|
}
|
|
27
41
|
}
|
|
28
|
-
declare module '@vixt/core/client' {
|
|
29
|
-
interface VixtAppConfig {
|
|
30
|
-
/** https://github.com/prazdevs/pinia-plugin-persistedstate */
|
|
31
|
-
piniaPersistedState?: PluginOptions$1;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
42
|
declare const presetVitepress: _vixt_core.VixtModule<VixtOptions>;
|
|
35
43
|
|
|
36
44
|
declare const _default: (options?: VixtOptions | undefined) => vite.PluginOption;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { defineVixtModule, resolveLayersDirs, createVixtPlugin } from '@vixt/core';
|
|
2
|
-
import { generateCss, generateAppConfig, generatePlugins } from '@vixt/vue';
|
|
3
|
-
import fs from 'fs-extra';
|
|
1
|
+
import { generateClient, generateCss, generateAppConfig, generatePlugins, defineVixtModule, resolveLayersDirs, createVixtPlugin } from '@vixt/core';
|
|
4
2
|
import path from 'pathe';
|
|
3
|
+
import fs from 'fs-extra';
|
|
5
4
|
import defu from 'defu';
|
|
6
5
|
import UnoCSS from 'unocss/vite';
|
|
7
6
|
import AutoImport from 'unplugin-auto-import/vite';
|
|
@@ -16,6 +15,7 @@ function generateMainTs(options, vixt) {
|
|
|
16
15
|
fs.outputFileSync(mainTsPath, `// Generated by Vixt
|
|
17
16
|
// This file transform from '${path.basename(buildDir)}/main.ts'
|
|
18
17
|
`);
|
|
18
|
+
generateClient(vixt);
|
|
19
19
|
const cssTemplate = generateCss(options);
|
|
20
20
|
const appConfigTemplate = generateAppConfig(vixt);
|
|
21
21
|
const pluginsTemplate = generatePlugins(vixt);
|
|
@@ -44,18 +44,19 @@ export default {
|
|
|
44
44
|
fs.outputFileSync(path.resolve(buildDir, "main.ts"), code);
|
|
45
45
|
return code;
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
|
|
48
|
+
const name$1 = "vixt:app-vitepress";
|
|
48
49
|
const defaults$1 = {
|
|
49
50
|
css: []
|
|
50
51
|
};
|
|
51
52
|
const appVitepress = defineVixtModule({
|
|
52
|
-
meta: { name, configKey: "app" },
|
|
53
|
+
meta: { name: name$1, configKey: "app" },
|
|
53
54
|
defaults: defaults$1,
|
|
54
55
|
setup(options, vixt) {
|
|
55
56
|
let mainTsCode;
|
|
56
57
|
const mainTsPath = path.resolve(".vitepress/theme/index.ts");
|
|
57
58
|
return {
|
|
58
|
-
name,
|
|
59
|
+
name: name$1,
|
|
59
60
|
configResolved() {
|
|
60
61
|
mainTsCode = generateMainTs(options, vixt);
|
|
61
62
|
},
|
|
@@ -71,7 +72,9 @@ const appVitepress = defineVixtModule({
|
|
|
71
72
|
}
|
|
72
73
|
});
|
|
73
74
|
|
|
75
|
+
const name = "vixt:preset-vitepress";
|
|
74
76
|
const presetVitepress = defineVixtModule({
|
|
77
|
+
meta: { name },
|
|
75
78
|
async setup(_, vixt) {
|
|
76
79
|
const { components, composables = [], constants = [], utils = [], stores = [] } = resolveLayersDirs(vixt._layers);
|
|
77
80
|
const { buildTypesDir, buildImportsDir } = vixt.options;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixt/vitepress",
|
|
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",
|
|
@@ -19,10 +19,11 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"vitepress": "^1.6.3",
|
|
22
|
-
"@vixt/core": "0.
|
|
23
|
-
"@vixt/vue": "0.
|
|
22
|
+
"@vixt/core": "0.4.1",
|
|
23
|
+
"@vixt/vue": "0.4.1"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
|
-
"build": "unbuild"
|
|
26
|
+
"build": "unbuild",
|
|
27
|
+
"dev": "unbuild --stub"
|
|
27
28
|
}
|
|
28
29
|
}
|