@pinegrow/iles-module 3.0.0-beta.94 → 3.0.0-beta.95
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.cjs +47 -9
- package/dist/index.js +47 -9
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -16,16 +16,54 @@ async function getViteConfiguration(moduleOptions) {
|
|
|
16
16
|
const config = {
|
|
17
17
|
plugins: vitePlugin ? [vitePlugin] : []
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
const isObject$1 = (value) => {
|
|
20
|
+
return Object.prototype.toString.call(value) === "[object Object]";
|
|
21
|
+
};
|
|
22
|
+
const arraify = (target) => {
|
|
23
|
+
return Array.isArray(target) ? target : [target];
|
|
24
|
+
};
|
|
25
|
+
const mergeConfigRecursively = (defaults, overrides) => {
|
|
26
|
+
const merged = { ...defaults };
|
|
27
|
+
for (const key in overrides) {
|
|
28
|
+
const value = overrides[key];
|
|
29
|
+
if (value == null) {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const existing = merged[key];
|
|
33
|
+
if (existing == null) {
|
|
34
|
+
merged[key] = value;
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
if (Array.isArray(existing) || Array.isArray(value)) {
|
|
38
|
+
merged[key] = [
|
|
39
|
+
...arraify(existing !== null && existing !== void 0 ? existing : []),
|
|
40
|
+
...arraify(value !== null && value !== void 0 ? value : [])
|
|
41
|
+
];
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
if (isObject$1(existing) && isObject$1(value)) {
|
|
45
|
+
merged[key] = mergeConfigRecursively(existing, value, rootPath ? `${rootPath}.${key}` : key);
|
|
46
|
+
continue;
|
|
27
47
|
}
|
|
28
|
-
|
|
48
|
+
merged[key] = value;
|
|
49
|
+
}
|
|
50
|
+
return merged;
|
|
51
|
+
};
|
|
52
|
+
const mergeConfig = (defaults, overrides) => {
|
|
53
|
+
return mergeConfigRecursively(defaults || {}, overrides || {});
|
|
54
|
+
};
|
|
55
|
+
(_a = config.plugins) == null ? void 0 : _a.push(
|
|
56
|
+
_vite2.default.call(void 0,
|
|
57
|
+
mergeConfig(
|
|
58
|
+
{
|
|
59
|
+
imports: ["vue"],
|
|
60
|
+
dirs: [],
|
|
61
|
+
vueTemplate: true,
|
|
62
|
+
cache: true
|
|
63
|
+
},
|
|
64
|
+
moduleOptions.autoImportAPIs
|
|
65
|
+
)
|
|
66
|
+
)
|
|
29
67
|
);
|
|
30
68
|
return config;
|
|
31
69
|
}
|
package/dist/index.js
CHANGED
|
@@ -16,16 +16,54 @@ async function getViteConfiguration(moduleOptions) {
|
|
|
16
16
|
const config = {
|
|
17
17
|
plugins: vitePlugin ? [vitePlugin] : []
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
const isObject$1 = (value) => {
|
|
20
|
+
return Object.prototype.toString.call(value) === "[object Object]";
|
|
21
|
+
};
|
|
22
|
+
const arraify = (target) => {
|
|
23
|
+
return Array.isArray(target) ? target : [target];
|
|
24
|
+
};
|
|
25
|
+
const mergeConfigRecursively = (defaults, overrides) => {
|
|
26
|
+
const merged = { ...defaults };
|
|
27
|
+
for (const key in overrides) {
|
|
28
|
+
const value = overrides[key];
|
|
29
|
+
if (value == null) {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const existing = merged[key];
|
|
33
|
+
if (existing == null) {
|
|
34
|
+
merged[key] = value;
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
if (Array.isArray(existing) || Array.isArray(value)) {
|
|
38
|
+
merged[key] = [
|
|
39
|
+
...arraify(existing !== null && existing !== void 0 ? existing : []),
|
|
40
|
+
...arraify(value !== null && value !== void 0 ? value : [])
|
|
41
|
+
];
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
if (isObject$1(existing) && isObject$1(value)) {
|
|
45
|
+
merged[key] = mergeConfigRecursively(existing, value, rootPath ? `${rootPath}.${key}` : key);
|
|
46
|
+
continue;
|
|
27
47
|
}
|
|
28
|
-
|
|
48
|
+
merged[key] = value;
|
|
49
|
+
}
|
|
50
|
+
return merged;
|
|
51
|
+
};
|
|
52
|
+
const mergeConfig = (defaults, overrides) => {
|
|
53
|
+
return mergeConfigRecursively(defaults || {}, overrides || {});
|
|
54
|
+
};
|
|
55
|
+
(_a = config.plugins) == null ? void 0 : _a.push(
|
|
56
|
+
autoImportAPIs(
|
|
57
|
+
mergeConfig(
|
|
58
|
+
{
|
|
59
|
+
imports: ["vue"],
|
|
60
|
+
dirs: [],
|
|
61
|
+
vueTemplate: true,
|
|
62
|
+
cache: true
|
|
63
|
+
},
|
|
64
|
+
moduleOptions.autoImportAPIs
|
|
65
|
+
)
|
|
66
|
+
)
|
|
29
67
|
);
|
|
30
68
|
return config;
|
|
31
69
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinegrow/iles-module",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.95",
|
|
4
4
|
"description": "Pinegrow Iles Module",
|
|
5
5
|
"author": "Pinegrow (http://pinegrow.com/)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"increment-beta-version": "npm version prerelease --preid=beta"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@pinegrow/vite-plugin": "3.0.0-beta.
|
|
34
|
+
"@pinegrow/vite-plugin": "3.0.0-beta.95",
|
|
35
35
|
"node-html-parser": "^6.1.5",
|
|
36
36
|
"unplugin-auto-import": "^0.15.2"
|
|
37
37
|
},
|