@vixt/core 0.6.8 → 0.7.1
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/node/index.d.mts +6 -0
- package/dist/node/index.mjs +5 -4
- package/package.json +4 -4
package/dist/node/index.d.mts
CHANGED
|
@@ -137,6 +137,12 @@ interface VixtOptions {
|
|
|
137
137
|
plugins?: string[];
|
|
138
138
|
/** typescript */
|
|
139
139
|
typescript?: TypescriptOptions;
|
|
140
|
+
/**
|
|
141
|
+
* Whether to copy layers from `node_modules` to `.vixt/layers`
|
|
142
|
+
* @default true
|
|
143
|
+
* @experimental
|
|
144
|
+
*/
|
|
145
|
+
copyLayers?: boolean;
|
|
140
146
|
/** custom options */
|
|
141
147
|
[key: string]: any;
|
|
142
148
|
}
|
package/dist/node/index.mjs
CHANGED
|
@@ -74,12 +74,14 @@ async function loadVixtConfig(opts) {
|
|
|
74
74
|
return result;
|
|
75
75
|
}
|
|
76
76
|
function applyLayers(layers, config) {
|
|
77
|
-
const { rootDir, buildLayersDir } = config;
|
|
77
|
+
const { rootDir, buildLayersDir, copyLayers = true } = config;
|
|
78
78
|
return layers.filter((e) => e.cwd).map((layer) => {
|
|
79
|
-
|
|
79
|
+
layer.config ??= {};
|
|
80
|
+
layer.config.meta ??= {};
|
|
81
|
+
const meta = layer.config.meta;
|
|
80
82
|
const layerName = meta.name || layer.cwd.split("/").pop();
|
|
81
83
|
if (!isSamePath(layer.cwd, resolve(rootDir))) meta.alias = `#/layers/${layerName}`;
|
|
82
|
-
if (layer.cwd?.includes("node_modules")) {
|
|
84
|
+
if (copyLayers && layer.cwd?.includes("node_modules")) {
|
|
83
85
|
const newCwd = resolve(buildLayersDir, layerName);
|
|
84
86
|
fs.removeSync(newCwd);
|
|
85
87
|
fs.copySync(layer.cwd, newCwd, { filter: (src) => {
|
|
@@ -89,7 +91,6 @@ function applyLayers(layers, config) {
|
|
|
89
91
|
} });
|
|
90
92
|
layer.cwd = newCwd;
|
|
91
93
|
}
|
|
92
|
-
layer.config ??= {};
|
|
93
94
|
layer.config.rootDir ??= layer.cwd;
|
|
94
95
|
layer.config.srcDir ??= resolve(layer.config.rootDir, "src");
|
|
95
96
|
layer.config.modulesDir ??= resolve(layer.config.srcDir, "modules");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixt/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.1",
|
|
5
5
|
"author": "SoulLyoko<https://github.com/SoulLyoko>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://soullyoko.github.io/vixt/",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@types/fs-extra": "^11.0.4",
|
|
31
|
-
"@vitejs/plugin-basic-ssl": "^2.1.
|
|
32
|
-
"@vitejs/plugin-legacy": "^
|
|
31
|
+
"@vitejs/plugin-basic-ssl": "^2.1.3",
|
|
32
|
+
"@vitejs/plugin-legacy": "^8.0.0-beta.0",
|
|
33
33
|
"@vue/tsconfig": "^0.8.1",
|
|
34
34
|
"c12": "^3.3.3",
|
|
35
35
|
"cac": "^6.7.14",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"mlly": "^1.8.0",
|
|
42
42
|
"pathe": "^2.0.3",
|
|
43
43
|
"pkg-types": "^2.3.0",
|
|
44
|
-
"vite": "^7.3.
|
|
44
|
+
"vite": "^7.3.1",
|
|
45
45
|
"vite-bundle-analyzer": "^1.3.2",
|
|
46
46
|
"vite-plugin-checker": "^0.12.0"
|
|
47
47
|
}
|