@frontic/nuxt 0.1.8 → 0.1.9
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/module.mjs +9 -1
- package/package.json +5 -3
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readdirSync } from 'node:fs';
|
|
2
2
|
import { dirname, join } from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
|
-
import { defineNuxtModule, createResolver, addServerHandler, addImports, addComponentsDir, addComponentExports } from '@nuxt/kit';
|
|
4
|
+
import { defineNuxtModule, createResolver, addServerHandler, hasNuxtModule, installModule, addImports, addComponentsDir, addComponentExports } from '@nuxt/kit';
|
|
5
5
|
|
|
6
6
|
const _dirname = typeof __dirname !== "undefined" ? __dirname : dirname(fileURLToPath(import.meta.url));
|
|
7
7
|
const ALL_COMPOSABLES = ["block", "listing", "search", "page", "context", "client"];
|
|
@@ -100,6 +100,14 @@ frontic: { composables: false }
|
|
|
100
100
|
tsConfig.compilerOptions.paths ||= {};
|
|
101
101
|
tsConfig.compilerOptions.paths["@frontic/stack/*"] = [`../${clientDirName}/*`];
|
|
102
102
|
});
|
|
103
|
+
if (anyComposableEnabled) {
|
|
104
|
+
if (!hasNuxtModule("@pinia/nuxt", nuxt)) {
|
|
105
|
+
await installModule("@pinia/nuxt", {}, nuxt);
|
|
106
|
+
}
|
|
107
|
+
if (!hasNuxtModule("@pinia/colada-nuxt", nuxt)) {
|
|
108
|
+
await installModule("@pinia/colada-nuxt", {}, nuxt);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
103
111
|
if (anyComposableEnabled) {
|
|
104
112
|
const composablesDir = resolve(runtimeDir, "composables");
|
|
105
113
|
const utilsDir = resolve(runtimeDir, "utils");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontic/nuxt",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Nuxt module for Frontstack headless commerce - zero config data fetching composables with smart caching, page routing, and context management",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Frontic",
|
|
@@ -41,9 +41,11 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@nuxt/kit": "^3.17.0",
|
|
44
|
-
"@pinia/colada": "^0.
|
|
44
|
+
"@pinia/colada": "^0.21.0",
|
|
45
|
+
"@pinia/colada-nuxt": "^0.3.0",
|
|
46
|
+
"@pinia/nuxt": "^0.11.0",
|
|
45
47
|
"@vueuse/core": "^12.0.0",
|
|
46
|
-
"pinia": "^
|
|
48
|
+
"pinia": "^3.0.0"
|
|
47
49
|
},
|
|
48
50
|
"devDependencies": {
|
|
49
51
|
"@nuxt/module-builder": "^1.0.2",
|