una-nuxt-module 2.1.19 → 2.1.21
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.json +1 -1
- package/dist/module.mjs +4 -3
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -100,8 +100,9 @@ function getFile(filePath) {
|
|
|
100
100
|
|
|
101
101
|
function useComponentScanner() {
|
|
102
102
|
const { resolve } = createResolver(import.meta.url);
|
|
103
|
+
const isDev = resolve("./").split("/").at(-1) === "templates";
|
|
103
104
|
function scanComponentDirectories() {
|
|
104
|
-
const componentsDirectory =
|
|
105
|
+
const componentsDirectory = isDev ? resolve("../runtime/components/ui") : resolve("./runtime/components/ui");
|
|
105
106
|
if (!doesDirectoryExist(componentsDirectory)) {
|
|
106
107
|
console.warn(`UI components directory not found: ${componentsDirectory}`);
|
|
107
108
|
return [];
|
|
@@ -113,7 +114,7 @@ function useComponentScanner() {
|
|
|
113
114
|
return subdirectories;
|
|
114
115
|
}
|
|
115
116
|
function getFilesForComponent(component) {
|
|
116
|
-
const directory =
|
|
117
|
+
const directory = isDev ? resolve(`../runtime/components/ui/${component}`) : resolve(`./runtime/components/ui/${component}`);
|
|
117
118
|
if (!doesDirectoryExist(directory)) {
|
|
118
119
|
console.warn(`Component directory not found: ${directory}`);
|
|
119
120
|
return [];
|
|
@@ -197,7 +198,7 @@ function addTemplates() {
|
|
|
197
198
|
}
|
|
198
199
|
|
|
199
200
|
const name = "una-nuxt-module";
|
|
200
|
-
const version = "2.1.
|
|
201
|
+
const version = "2.1.21";
|
|
201
202
|
|
|
202
203
|
const module = defineNuxtModule({
|
|
203
204
|
meta: {
|