@vixt/vitepress 0.6.0 → 0.6.2
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.
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineVixtPlugin } from "@vixt/core/client";
|
|
2
|
+
import { createPinia } from "pinia";
|
|
3
|
+
import { createPersistedState } from "pinia-plugin-persistedstate";
|
|
4
|
+
|
|
5
|
+
//#region src/client/plugins/pinia.ts
|
|
6
|
+
var pinia_default = defineVixtPlugin({
|
|
7
|
+
name: "vixt:pinia",
|
|
8
|
+
setup(vixt) {
|
|
9
|
+
const { app, appConfig } = vixt;
|
|
10
|
+
const pinia = createPinia();
|
|
11
|
+
pinia.use(createPersistedState(appConfig.piniaPersistedState));
|
|
12
|
+
app.use(pinia);
|
|
13
|
+
vixt.pinia = pinia;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { pinia_default as default };
|
package/dist/index.mjs
CHANGED
|
@@ -85,15 +85,17 @@ var preset_vitepress_default = defineVixtModule({
|
|
|
85
85
|
|
|
86
86
|
//#endregion
|
|
87
87
|
//#region src/index.ts
|
|
88
|
+
const plugins = ["@vixt/vitepress/client/plugins/pinia"];
|
|
88
89
|
var src_default = createVixtPlugin({ defaults: {
|
|
89
90
|
srcDir: path.resolve(cwd(), ".vitepress/theme"),
|
|
90
91
|
modules: [preset_vitepress_default],
|
|
91
|
-
plugins
|
|
92
|
+
plugins,
|
|
92
93
|
app: {
|
|
93
94
|
entryFile: "index.ts",
|
|
94
95
|
entryCode: fs.readFileSync(resolvePathSync("@vixt/vitepress/client/entry"), "utf-8")
|
|
95
96
|
},
|
|
96
|
-
typescript: { tsConfig: { compilerOptions: { types: ["@vixt/vitepress/types"] } } }
|
|
97
|
+
typescript: { tsConfig: { compilerOptions: { types: ["@vixt/vitepress/types"] } } },
|
|
98
|
+
vite: { optimizeDeps: { exclude: plugins } }
|
|
97
99
|
} });
|
|
98
100
|
|
|
99
101
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixt/vitepress",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.2",
|
|
5
5
|
"author": "SoulLyoko<https://github.com/SoulLyoko>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://soullyoko.github.io/vixt/",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"vitepress": "^1.6.4",
|
|
27
|
-
"@vixt/
|
|
28
|
-
"@vixt/
|
|
27
|
+
"@vixt/core": "0.6.2",
|
|
28
|
+
"@vixt/vue": "0.6.2"
|
|
29
29
|
}
|
|
30
30
|
}
|