@kengic/uni 0.7.6 → 0.7.7
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/package.json +1 -1
- package/script/cmd.mjs +11 -0
package/package.json
CHANGED
package/script/cmd.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
|
+
import fs from 'fs';
|
|
2
3
|
|
|
3
4
|
const program = new Command();
|
|
4
5
|
|
|
@@ -22,6 +23,16 @@ async function cmd() {
|
|
|
22
23
|
log(`命令参数 | ${JSON.stringify(args)}`);
|
|
23
24
|
log(`当前目录 | ${process.cwd()}`);
|
|
24
25
|
|
|
26
|
+
if (!args.appid) {
|
|
27
|
+
log(`参数 appid 不能为空`);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const targetDir = process.cwd() + '/android/app/src/main/assets/apps/__UNI__8B6E231/www';
|
|
32
|
+
log(`开始删除旧的目录 | ${targetDir}`);
|
|
33
|
+
fs.rmSync(targetDir);
|
|
34
|
+
log(`完成删除旧的目录 | ${targetDir}`);
|
|
35
|
+
|
|
25
36
|
// TODO LT
|
|
26
37
|
log('复制成功');
|
|
27
38
|
} catch (e) {
|