tt-minigame-ide-cli 2.0.0-alpha.1 → 2.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
CHANGED
@@ -1,11 +1,150 @@
|
|
1
1
|
# `tt-minigame-ide-cli`
|
2
2
|
|
3
|
-
|
3
|
+
## 介绍
|
4
4
|
|
5
|
-
|
5
|
+
开发者工具提供了命令行供外部调用,开发者可以通过命令行工具进行登录、预览、上传等操作。
|
6
6
|
|
7
|
+
小游戏命令行工具已升级至 2.0.0 版本,在命令行使用方式上同 1.x.x 版本一致。默认情况下自 2.0.0 版本起,会采集部分行为数据以帮助我们了解如何更好地改进产品,您也可以通过 set-config 命令来禁止该行为。
|
8
|
+
|
9
|
+
命令行工具安装方式:
|
10
|
+
|
11
|
+
```js
|
12
|
+
npm install -g tt-minigame-ide-cli
|
13
|
+
```
|
14
|
+
|
15
|
+
---
|
16
|
+
|
17
|
+
## 使用
|
18
|
+
|
19
|
+
### 设置全局配置
|
20
|
+
|
21
|
+
主要用于配置工具的全局代理
|
22
|
+
|
23
|
+
#### 命令行使用
|
24
|
+
|
25
|
+
```bash
|
26
|
+
Usage: tmg set-config [options]
|
27
|
+
|
28
|
+
Set tt-ide-cli config
|
29
|
+
|
30
|
+
Options:
|
31
|
+
-p, --proxy <proxy> Set global proxy(配置全局代理)
|
32
|
+
--default Use default(恢复为默认配置)
|
33
|
+
-r, --allow-report-event 允许采集使用行为(yes|no),默认为 yes
|
34
|
+
```
|
35
|
+
|
36
|
+
### 登录
|
37
|
+
|
38
|
+
登录到开发者平台。支持代理设置。
|
39
|
+
|
40
|
+
```js
|
41
|
+
Usage: tmg login [options]
|
42
|
+
|
43
|
+
Login to the developer platform
|
44
|
+
|
45
|
+
Options:
|
46
|
+
|
47
|
+
-m, --mobile Login by mobile
|
48
|
+
|
49
|
+
-e, --email Login by email
|
50
|
+
|
51
|
+
-p, --proxy <proxy> Login with proxy
|
52
|
+
|
53
|
+
-h, --help output usage information
|
7
54
|
```
|
8
|
-
const ttMinigameIdeCli = require('tt-minigame-ide-cli');
|
9
55
|
|
10
|
-
|
56
|
+
### 通过 email 登录
|
57
|
+
|
58
|
+
```js
|
59
|
+
Usage: tmg login-e [email] [password]
|
60
|
+
|
61
|
+
Login to the developer platform by E-mail
|
62
|
+
|
63
|
+
Options:
|
64
|
+
|
65
|
+
-p, --proxy <proxy> Login with proxy
|
66
|
+
|
67
|
+
-h, --help Output usage information
|
68
|
+
```
|
69
|
+
|
70
|
+
### 登出(清除本地 session)
|
71
|
+
|
72
|
+
#### 命令行使用
|
73
|
+
|
74
|
+
```bash
|
75
|
+
Usage: tmg logout
|
76
|
+
|
77
|
+
Logout and clear the session.
|
78
|
+
```
|
79
|
+
|
80
|
+
### 预览小游戏
|
81
|
+
|
82
|
+
将项目上传后,扫码二维码来预览小游戏。
|
83
|
+
|
84
|
+
```js
|
85
|
+
Usage: tmg preview [options] [entry]
|
86
|
+
|
87
|
+
preview project by remote
|
88
|
+
|
89
|
+
Options:
|
90
|
+
|
91
|
+
-f, --force Preview project without local cache(deprecated)
|
92
|
+
|
93
|
+
--disable-cache Preview project without local cache
|
94
|
+
|
95
|
+
-s, --small Use small QR Code, but it does not take effect in some environments
|
96
|
+
|
97
|
+
-u, --copy Copy remote url to clipboard
|
98
|
+
|
99
|
+
-p, --proxy <proxy> Preview with proxy
|
100
|
+
|
101
|
+
-h, --help output usage information
|
102
|
+
|
103
|
+
-o, --output <path> QRCode image output path
|
104
|
+
```
|
105
|
+
|
106
|
+
### 上传项目
|
107
|
+
|
108
|
+
把项目上传到开发者平台进行发布。
|
109
|
+
|
110
|
+
```js
|
111
|
+
Usage: tmg upload [options] [entry]
|
112
|
+
|
113
|
+
upload project to the developer platform
|
114
|
+
|
115
|
+
Options:
|
116
|
+
|
117
|
+
-v, --app-version <version> App version (eg: [major].[minor].[patch])
|
118
|
+
|
119
|
+
-c, --app-changelog <log> Changelog for this version
|
120
|
+
|
121
|
+
-p, --proxy <proxy> Update request proxy
|
122
|
+
|
123
|
+
-u, --copy Copy remote url to clipboard
|
124
|
+
|
125
|
+
-h, --help output usage information
|
126
|
+
|
127
|
+
-o, --output <path> QRCode image output path
|
128
|
+
```
|
129
|
+
|
130
|
+
### 获取项目版本
|
131
|
+
|
132
|
+
获取项目线上版本号。
|
133
|
+
|
134
|
+
```js
|
135
|
+
Usage: tmg version [entry]
|
136
|
+
|
137
|
+
Get latest released version of project
|
138
|
+
```
|
139
|
+
|
140
|
+
### 构建 NPM
|
141
|
+
|
142
|
+
对应开发者工具 <a href="https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/framework/npm/" target="_blank">构建 NPM</a> 功能
|
143
|
+
|
144
|
+
#### 命令行使用
|
145
|
+
|
146
|
+
```bash
|
147
|
+
Usage: tmg build-npm [entry]
|
148
|
+
|
149
|
+
Build npm
|
11
150
|
```
|