@vixt/vitepress 0.1.28 → 0.1.30
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.mjs +7 -4
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineVixtModule, resolveLayersDirs, createVixtPlugin } from '@vixt/core';
|
|
2
2
|
import { generateCss, generateAppConfig, generatePlugins } from '@vixt/vue';
|
|
3
3
|
import fs from 'fs-extra';
|
|
4
|
-
import path from 'pathe';
|
|
4
|
+
import path, { resolve } from 'pathe';
|
|
5
|
+
import { cwd } from 'node:process';
|
|
5
6
|
import defu from 'defu';
|
|
6
7
|
import UnoCSS from 'unocss/vite';
|
|
7
8
|
import AutoImport from 'unplugin-auto-import/vite';
|
|
@@ -10,11 +11,11 @@ import { VueRouterAutoImports } from 'unplugin-vue-router';
|
|
|
10
11
|
import VueDevTools from 'vite-plugin-vue-devtools';
|
|
11
12
|
|
|
12
13
|
function generateMainTs(options, vixt) {
|
|
13
|
-
const { buildDir
|
|
14
|
+
const { buildDir } = vixt.options;
|
|
14
15
|
const mainTsPath = path.resolve(".vitepress/theme/index.ts");
|
|
15
16
|
if (!fs.existsSync(mainTsPath))
|
|
16
17
|
fs.outputFileSync(mainTsPath, `// Generated by Vixt
|
|
17
|
-
// This file transform from '${
|
|
18
|
+
// This file transform from '${path.basename(buildDir)}/main.ts'
|
|
18
19
|
`);
|
|
19
20
|
const cssTemplate = generateCss(options);
|
|
20
21
|
const appConfigTemplate = generateAppConfig(vixt);
|
|
@@ -73,9 +74,10 @@ const appVitepress = defineVixtModule({
|
|
|
73
74
|
|
|
74
75
|
const presetVitepress = defineVixtModule({
|
|
75
76
|
async setup(_, vixt) {
|
|
76
|
-
const { components, composables = [], constants = [], utils = [], stores = [] } = resolveLayersDirs(vixt._layers
|
|
77
|
+
const { components, composables = [], constants = [], utils = [], stores = [] } = resolveLayersDirs(vixt._layers);
|
|
77
78
|
const { buildTypesDir, buildImportsDir } = vixt.options;
|
|
78
79
|
const defaultOptions = {
|
|
80
|
+
srcDir: resolve(cwd(), ".vitepress"),
|
|
79
81
|
components: {
|
|
80
82
|
dts: `${buildTypesDir}/components.d.ts`,
|
|
81
83
|
dirs: components,
|
|
@@ -85,6 +87,7 @@ const presetVitepress = defineVixtModule({
|
|
|
85
87
|
include: [/\.vue$/, /\.vue\?vue/, /\.md$/]
|
|
86
88
|
},
|
|
87
89
|
imports: {
|
|
90
|
+
include: [/\.md/, /\.md\?md/],
|
|
88
91
|
imports: ["vue", "@vueuse/core", "pinia", VueRouterAutoImports],
|
|
89
92
|
dts: `${buildTypesDir}/auto-imports.d.ts`,
|
|
90
93
|
dirs: [...composables, ...constants, ...stores, ...utils, buildImportsDir],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixt/vitepress",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.30",
|
|
5
5
|
"author": "SoulLyoko<https://github.com/SoulLyoko>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/SoulLyoko/vixt#readme",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"vitepress": "^1.5.0",
|
|
22
|
-
"@vixt/core": "0.1.
|
|
23
|
-
"@vixt/vue": "0.1.
|
|
22
|
+
"@vixt/core": "0.1.30",
|
|
23
|
+
"@vixt/vue": "0.1.30"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "unbuild"
|