ms-vite-plugin 0.3.0 → 0.3.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/build.js +4 -1
- package/package.json +1 -1
package/dist/build.js
CHANGED
|
@@ -181,6 +181,7 @@ async function normalizePythonArtifacts(rootDir) {
|
|
|
181
181
|
const buildAll = async (isDev = true, workspacePath) => {
|
|
182
182
|
const isJs = await fsExtra.pathExists(path.join(workspacePath, "scripts", "main.js"));
|
|
183
183
|
const isPy = await fsExtra.pathExists(path.join(workspacePath, "scripts", "main.py"));
|
|
184
|
+
const isLua = await fsExtra.pathExists(path.join(workspacePath, "scripts", "main.lua"));
|
|
184
185
|
if (isJs) {
|
|
185
186
|
console.log("🚀 开始构建JavaScript项目...");
|
|
186
187
|
const obfuscatorConfigPath = path.join(workspacePath, "obfuscator.json");
|
|
@@ -230,8 +231,10 @@ const buildAll = async (isDev = true, workspacePath) => {
|
|
|
230
231
|
}
|
|
231
232
|
const outPath = path.join(workspacePath, "msbundle");
|
|
232
233
|
await fsExtra.ensureDir(outPath);
|
|
233
|
-
if (isPy) {
|
|
234
|
+
if (isPy || isLua) {
|
|
234
235
|
await fsExtra.copy(path.join(workspacePath, "scripts"), path.join(outPath, "scripts"));
|
|
236
|
+
}
|
|
237
|
+
if (isPy) {
|
|
235
238
|
// 获取系统有没有 3.14 版本的 python
|
|
236
239
|
const py = detectPython314();
|
|
237
240
|
if (py.ok) {
|