@ttmg/cli 0.3.1-unity.10 → 0.3.1-unity.13
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.js +23 -13
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/public/assets/{index-SqdluTsf.js → index-YhxvkywD.js} +1 -1
- package/dist/public/assets/index-YhxvkywD.js.br +0 -0
- package/dist/public/index.html +1 -1
- package/dist/scripts/worker.js +4 -15
- package/package.json +1 -1
- package/dist/public/assets/index-BLMuzkOF.js +0 -67
- package/dist/public/assets/index-BLMuzkOF.js.br +0 -0
- package/dist/public/assets/index-O0TENe77.js +0 -67
- package/dist/public/assets/index-O0TENe77.js.br +0 -0
- package/dist/public/assets/index-SqdluTsf.js.br +0 -0
- package/dist/public/assets/index-tH12LIuT.js +0 -67
- package/dist/public/assets/index-tH12LIuT.js.br +0 -0
|
Binary file
|
package/dist/public/index.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
rel="stylesheet"
|
|
13
13
|
/>
|
|
14
14
|
<title>TikTok Mini Games DevTool</title>
|
|
15
|
-
<script type="module" crossorigin src="/assets/index-
|
|
15
|
+
<script type="module" crossorigin src="/assets/index-YhxvkywD.js"></script>
|
|
16
16
|
<link rel="stylesheet" crossorigin href="/assets/index-sCifET6h.css">
|
|
17
17
|
</head>
|
|
18
18
|
<body>
|
package/dist/scripts/worker.js
CHANGED
|
@@ -100,15 +100,13 @@ async function compile(context = {}) {
|
|
|
100
100
|
|
|
101
101
|
parentPort?.postMessage({ type: 'status', status: 'start' });
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
clientKey + '_compile_' + Date.now().toString(),
|
|
107
|
-
);
|
|
103
|
+
if (fs.existsSync(outputDir)) {
|
|
104
|
+
fs.rmSync(outputDir, { recursive: true, force: true });
|
|
105
|
+
}
|
|
108
106
|
// 调用打包
|
|
109
107
|
const { isSuccess, errorMsg, packages } = await debugPkgs({
|
|
110
108
|
entry: entryDir,
|
|
111
|
-
output:
|
|
109
|
+
output: outputDir,
|
|
112
110
|
dev: {
|
|
113
111
|
enable: true,
|
|
114
112
|
port: devPort,
|
|
@@ -127,15 +125,6 @@ async function compile(context = {}) {
|
|
|
127
125
|
// spawnOptions: { stdio: ['ignore', 'pipe', 'pipe'] },
|
|
128
126
|
// concurrency: 4,
|
|
129
127
|
});
|
|
130
|
-
if (fs.existsSync(outputDir)) {
|
|
131
|
-
// 删除旧输出目录
|
|
132
|
-
fs.rmSync(outputDir, { recursive: true, force: true });
|
|
133
|
-
// 复制临时目录到输出目录
|
|
134
|
-
// 直接替换 outputDir 内容,避免生成 __TTMG_TEMP__ 子目录
|
|
135
|
-
fs.cpSync(outputTempDir, outputDir, { recursive: true });
|
|
136
|
-
// 删除临时目录
|
|
137
|
-
fs.rmSync(outputTempDir, { recursive: true, force: true });
|
|
138
|
-
}
|
|
139
128
|
if (fs.existsSync(path.join(outputDir, '__TTMG_TEMP__'))) {
|
|
140
129
|
fs.rmSync(path.join(outputDir, '__TTMG_TEMP__'), {
|
|
141
130
|
recursive: true,
|