@open-dy/tt-wasmsplit-ci 1.0.0

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/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # tt-wasmsplit-ci
2
+
3
+ # 介绍
4
+ 抖音小游戏分包工具,开发者可通过该命令行工具进行抖音小游戏的分包操作,包括:开启分包、获取分包状态、开始分包、终止分包。
5
+
6
+ 默认情况下会采集部分行为数据以帮助我们了解如何更好地改进产品,您也可以通过在命令中加入 '--no-report' 来禁止该行为。
7
+
8
+ # 使用
9
+
10
+ ## 安装
11
+ ```bash
12
+ npm install -g tt-wasmsplit-ci
13
+ ```
14
+
15
+ ## 使用 TMG 登录
16
+ 本工具使用 tmg (抖音开发者工具命令行版本) 登录信息进行认证,您需要先登录 tmg
17
+
18
+ 参考文档:https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/dev-tools/development-assistance/ide-cli
19
+
20
+ tmg 下载地址:https://www.npmjs.com/package/tt-minigame-ide-cli?activeTab=readme
21
+
22
+ ## 开启分包
23
+ ```bash
24
+ tt-wasmsplit-ci init -p <package> -i <appId> -m <version description>
25
+ ```
26
+ 输入需要开启分包的小游戏包,若该包未开启分包,则开启分包并输出用于收集函数的 prepare 包。
27
+ ```
28
+ Usage: tt-wasmsplit-ci init [options]
29
+
30
+ 开启分包并获取用于收集函数的 prepare 包
31
+
32
+ Options:
33
+ -p, --package <path> 原始包路径,必填
34
+ -i, --appid <appid> app id,必填
35
+ -r, --refer <ref_version> 增量分包参考版本,选填,为空时表示不使用增量分包
36
+ -s, --symbol <symbol> wasm符号表文件,选填,为空时自动在原始包所在目录的wasm_symbols子目录或原始包内寻找
37
+ -m, --message <version description> 分包版本描述,必填
38
+ --no-report 使用该参数时将不采集行为数据
39
+ -h, --help display help for command
40
+ ```
41
+
42
+ ## 获取分包状态
43
+ ```bash
44
+ tt-wasmsplit-ci getinfo -p <package> -i <appId>
45
+ ```
46
+ 输入需要查询分包状态的小游戏包,则获取当前分包信息、例如收集函数数量等,以及历史分包版本信息,并保存在指定文件中或原始包所在目录下的 gameinfo.txt
47
+ ```
48
+ Usage: tt-wasmsplit-ci getinfo [options]
49
+
50
+ 获取当前分包信息、例如收集函数数量等,以及历史分包版本信息
51
+
52
+ Options:
53
+ -p, --package <path> 原始包路径,必填
54
+ -i, --appid <appid> app id,必填
55
+ -o, --output <path> 项目收集信息,选填,为空时默认保存在原始包所在目录下的 gameinfo.txt
56
+ --no-report 使用该参数时将不采集行为数据
57
+ -h, --help display help for command
58
+ ```
59
+
60
+ ## 开始分包
61
+ ```bash
62
+ tt-wasmsplit-ci dosplit -p <package> -i <appId>
63
+ ```
64
+ 输入需要开始分包的小游戏包,请求分包服务器进行分包操作,并输出分包后的小游戏包
65
+ ```
66
+ Usage: tt-wasmsplit-ci dosplit [options]
67
+
68
+ 请求 wasm 分包并下载分包后小游戏包
69
+
70
+ Options:
71
+ -p, --package <path> 原始包路径,必填
72
+ -i, --appid <appid> app id,必填
73
+ -g, --debug 包含此参数下载 debug 包,反之下载 release 包 (default: false)
74
+ --no-report 使用该参数时将不采集行为数据
75
+ -h, --help display help for command
76
+ ```
77
+
78
+ ## 终止分包
79
+ ```bash
80
+ tt-wasmsplit-ci stop -p <package> -i <appId>
81
+ ```
82
+ 输入需要终止分包的小游戏包,若该包开启了分包,则终止分包。
83
+ ```
84
+ Usage: tt-wasmsplit-ci disable [options]
85
+
86
+ 终止分包
87
+
88
+ Options:
89
+ -p, --package <path> 原始包路径,必填
90
+ -i, --appid <appid> app id,必填
91
+ --no-report 使用该参数时将不采集行为数据
92
+ -h, --help display help for command
93
+ ```
Binary file