tt-minigame-ide-cli 0.0.1-beta.2 → 0.0.1-beta.3
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.en.md +10 -8
- package/README.md +13 -11
- package/bin/tmg.js +39 -39
- package/package.json +1 -1
- package/template/app.js +0 -5
- package/template/app.json +0 -11
- package/template/app.ttss +0 -0
- package/template/pages/index/index.js +0 -10
- package/template/pages/index/index.ttml +0 -1
- package/template/pages/index/index.ttss +0 -4
package/README.en.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# tmg-cli
|
2
2
|
|
3
|
-
> `tmg` cli is the official tool for bytedance
|
3
|
+
> `tmg` cli is the official tool for bytedance minigame development.
|
4
4
|
|
5
5
|
[中文](./README.md)
|
6
6
|
|
@@ -9,8 +9,8 @@
|
|
9
9
|
|
10
10
|
- [Installation](#installation)
|
11
11
|
- [Usage](#usage)
|
12
|
-
- [Create Project](#create-project)
|
13
|
-
- [Open existing project](#open-existing-project)
|
12
|
+
<!-- - [Create Project](#create-project)
|
13
|
+
- [Open existing project](#open-existing-project) -->
|
14
14
|
- [Login](#login)
|
15
15
|
- [Login by email](#login-by-email)
|
16
16
|
- [Preview project](#preview-project)
|
@@ -23,12 +23,12 @@
|
|
23
23
|
It's recommended to install `tmg` globally.
|
24
24
|
|
25
25
|
```
|
26
|
-
npm install -g tt-ide-cli
|
26
|
+
npm install -g tt-minigame-ide-cli
|
27
27
|
```
|
28
28
|
|
29
29
|
## Usage
|
30
30
|
|
31
|
-
### Create Project
|
31
|
+
<!-- ### Create Project
|
32
32
|
|
33
33
|
Create a new blank miniprogram project with given name in current folder.
|
34
34
|
|
@@ -41,9 +41,9 @@ Options:
|
|
41
41
|
|
42
42
|
-f, --force Overwrite target directory if it exists
|
43
43
|
-h, --help Output usage information
|
44
|
-
```
|
44
|
+
``` -->
|
45
45
|
|
46
|
-
### Open existing project
|
46
|
+
<!-- ### Open existing project
|
47
47
|
|
48
48
|
Open existing project with given path in microapp IDE.
|
49
49
|
|
@@ -53,7 +53,7 @@ If the path is not available, start up the IDE only.
|
|
53
53
|
Usage: tmg open <project-path>
|
54
54
|
|
55
55
|
Open target project by path
|
56
|
-
```
|
56
|
+
``` -->
|
57
57
|
|
58
58
|
### Login
|
59
59
|
|
@@ -99,6 +99,7 @@ Options:
|
|
99
99
|
-c, --copy Copy remote url to clipboard
|
100
100
|
-p, --proxy <proxy> Preview with proxy
|
101
101
|
-h, --help output usage information
|
102
|
+
-o, --output <path> QRCode image output path
|
102
103
|
```
|
103
104
|
|
104
105
|
### Upload project
|
@@ -116,4 +117,5 @@ Options:
|
|
116
117
|
-p, --proxy <proxy> Update request proxy
|
117
118
|
-cp, --copy Copy remote url to clipboard
|
118
119
|
-h, --help output usage information
|
120
|
+
-o, --output <path> QRCode image output path
|
119
121
|
```
|
package/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# tmg-cli
|
2
2
|
|
3
|
-
> `tmg`
|
3
|
+
> `tmg` 是字节跳动小小游戏官方提供的命令行工具。
|
4
4
|
|
5
5
|
[English](./README.en.md)
|
6
6
|
|
@@ -9,11 +9,11 @@
|
|
9
9
|
|
10
10
|
- [安装](#%E5%AE%89%E8%A3%85)
|
11
11
|
- [使用](#%E4%BD%BF%E7%94%A8)
|
12
|
-
- [创建新项目](#%E5%88%9B%E5%BB%BA%E6%96%B0%E9%A1%B9%E7%9B%AE)
|
13
|
-
- [打开已有项目](#%E6%89%93%E5%BC%80%E5%B7%B2%E6%9C%89%E9%A1%B9%E7%9B%AE)
|
12
|
+
<!-- - [创建新项目](#%E5%88%9B%E5%BB%BA%E6%96%B0%E9%A1%B9%E7%9B%AE)
|
13
|
+
- [打开已有项目](#%E6%89%93%E5%BC%80%E5%B7%B2%E6%9C%89%E9%A1%B9%E7%9B%AE) -->
|
14
14
|
- [登录](#%E7%99%BB%E5%BD%95)
|
15
15
|
- [通过 email 登录](#%E9%80%9A%E8%BF%87-email-%E7%99%BB%E5%BD%95)
|
16
|
-
- [
|
16
|
+
- [预览小游戏](#%E9%A2%84%E8%A7%88%E5%B0%8F%E7%A8%8B%E5%BA%8F)
|
17
17
|
- [上传项目](#%E4%B8%8A%E4%BC%A0%E9%A1%B9%E7%9B%AE)
|
18
18
|
|
19
19
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
@@ -23,12 +23,12 @@
|
|
23
23
|
建议在全局安装 `tmg` 。
|
24
24
|
|
25
25
|
```
|
26
|
-
npm install -g tt-ide-cli
|
26
|
+
npm install -g tt-minigame-ide-cli
|
27
27
|
```
|
28
28
|
|
29
29
|
## 使用
|
30
30
|
|
31
|
-
### 创建新项目
|
31
|
+
<!-- ### 创建新项目
|
32
32
|
|
33
33
|
在当前目录下,以给定的项目名字创建一个空白的小程序项目。
|
34
34
|
|
@@ -41,9 +41,9 @@ Options:
|
|
41
41
|
|
42
42
|
-f, --force Overwrite target directory if it exists
|
43
43
|
-h, --help Output usage information
|
44
|
-
```
|
44
|
+
``` -->
|
45
45
|
|
46
|
-
### 打开已有项目
|
46
|
+
<!-- ### 打开已有项目
|
47
47
|
|
48
48
|
在小程序开发者工具中打开给定目录的项目。
|
49
49
|
|
@@ -53,7 +53,7 @@ Options:
|
|
53
53
|
Usage: tmg open <project-path>
|
54
54
|
|
55
55
|
Open target project by path
|
56
|
-
```
|
56
|
+
``` -->
|
57
57
|
|
58
58
|
### 登录
|
59
59
|
|
@@ -84,9 +84,9 @@ Options:
|
|
84
84
|
|
85
85
|
```
|
86
86
|
|
87
|
-
###
|
87
|
+
### 预览小游戏
|
88
88
|
|
89
|
-
|
89
|
+
将项目上传后,扫码二维码来预览小游戏。
|
90
90
|
|
91
91
|
```
|
92
92
|
Usage: tmg preview [options] [entry]
|
@@ -100,6 +100,7 @@ Options:
|
|
100
100
|
-c, --copy Copy remote url to clipboard
|
101
101
|
-p, --proxy <proxy> Preview with proxy
|
102
102
|
-h, --help output usage information
|
103
|
+
-o, --output <path> QRCode image output path
|
103
104
|
```
|
104
105
|
|
105
106
|
### 上传项目
|
@@ -117,4 +118,5 @@ Options:
|
|
117
118
|
-p, --proxy <proxy> Update request proxy
|
118
119
|
-cp, --copy Copy remote url to clipboard
|
119
120
|
-h, --help output usage information
|
121
|
+
-o, --output <path> QRCode image output path
|
120
122
|
```
|
package/bin/tmg.js
CHANGED
@@ -15,50 +15,50 @@ program.version(getVersion(), '-V, --version', 'Output the current version');
|
|
15
15
|
|
16
16
|
//#region open project
|
17
17
|
|
18
|
-
program
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
18
|
+
// program
|
19
|
+
// .command('open <project-path>')
|
20
|
+
// .description('Open target project by path')
|
21
|
+
// .action((projectPath) => {
|
22
|
+
// const isMac = process.platform === 'darwin',
|
23
|
+
// IDE_SCHEMA = 'bytedanceide:';
|
24
|
+
// const openCmd = isMac ? `open ${IDE_SCHEMA}` : `explorer ${IDE_SCHEMA}`;
|
25
|
+
// let openPath;
|
26
|
+
// if (!path.isAbsolute(projectPath)) {
|
27
|
+
// projectPath = path.join(process.cwd(), projectPath);
|
28
|
+
// }
|
29
|
+
// if (fs.existsSync(projectPath)) {
|
30
|
+
// // open project with existing path
|
31
|
+
// console.log(chalk.green(`open projectPath: ${projectPath}`));
|
32
|
+
// openPath = `${openCmd}?path=${projectPath}`;
|
33
|
+
// } else {
|
34
|
+
// // project folder not exist,
|
35
|
+
// // open IDE
|
36
|
+
// console.log(chalk.green(`open IDE`));
|
37
|
+
// openPath = openCmd;
|
38
|
+
// }
|
39
|
+
|
40
|
+
// cp.exec(openPath, (error) => {
|
41
|
+
// if (!error) {
|
42
|
+
// console.log('打开IDE成功');
|
43
|
+
// } else {
|
44
|
+
// console.log(chalk.red('打开IDE失败', error));
|
45
|
+
// }
|
46
|
+
// });
|
47
|
+
// });
|
48
48
|
|
49
49
|
//#endregion
|
50
50
|
|
51
51
|
//#region create new project
|
52
52
|
|
53
|
-
program
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
53
|
+
// program
|
54
|
+
// .command('create <project-name>')
|
55
|
+
// .description('Create a new project with given name in current folder')
|
56
|
+
// .option('-f, --force', 'Overwrite target directory if it exists')
|
57
|
+
// .action((name, cmd) => {
|
58
|
+
// const options = cleanArgs(cmd);
|
59
|
+
// checkArgNum(1);
|
60
|
+
// require('../lib/create')(name, options);
|
61
|
+
// });
|
62
62
|
|
63
63
|
//#endregion
|
64
64
|
|
package/package.json
CHANGED
package/template/app.js
DELETED
package/template/app.json
DELETED
package/template/app.ttss
DELETED
File without changes
|
@@ -1 +0,0 @@
|
|
1
|
-
<view class="intro">Welcome to Mini Program</view>
|