ms-vite-plugin 0.2.7 → 0.2.8

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.
Files changed (2) hide show
  1. package/dist/build.js +8 -3
  2. package/package.json +1 -1
package/dist/build.js CHANGED
@@ -109,6 +109,7 @@ function prodReturnMain() {
109
109
  }
110
110
  const buildAll = async (isDev = true, workspacePath) => {
111
111
  const isJs = await fsExtra.pathExists(path.join(workspacePath, "scripts", "main.js"));
112
+ const isPy = await fsExtra.pathExists(path.join(workspacePath, "scripts", "main.py"));
112
113
  if (isJs) {
113
114
  console.log("🚀 开始构建JavaScript项目...");
114
115
  const obfuscatorConfigPath = path.join(workspacePath, "obfuscator.json");
@@ -156,10 +157,14 @@ const buildAll = async (isDev = true, workspacePath) => {
156
157
  if (isDev) {
157
158
  return;
158
159
  }
159
- // 打包完成后执行
160
- await fsExtra.copy(path.join(workspacePath, "res"), path.join(workspacePath, "msbundle", "res"));
161
- await fsExtra.copy(path.join(workspacePath, "ui"), path.join(workspacePath, "msbundle", "ui"));
162
160
  const outPath = path.join(workspacePath, "msbundle");
161
+ await fsExtra.ensureDir(outPath);
162
+ if (isPy) {
163
+ await fsExtra.copy(path.join(workspacePath, "scripts"), path.join(outPath, "scripts"));
164
+ }
165
+ // 打包完成后执行
166
+ await fsExtra.copy(path.join(workspacePath, "res"), path.join(outPath, "res"));
167
+ await fsExtra.copy(path.join(workspacePath, "ui"), path.join(outPath, "ui"));
163
168
  const distPath = path.join(workspacePath, "dist");
164
169
  const src = path.join(workspacePath, "package.json");
165
170
  const dest = path.join(outPath, "package.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ms-vite-plugin",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "type": "commonjs",
5
5
  "license": "MIT",
6
6
  "publishConfig": {