tmui-cli 1.0.3 → 1.0.6

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,90 @@
1
+
2
+
3
+ # TMUI 3.0
4
+
5
+ ![TMUI 3.0](https://tmui.design/images/logoGreat.png)
6
+
7
+ ### tmui-cli使用介绍
8
+
9
+ #### 全局安装
10
+
11
+ ```npm
12
+ npm -g install tmui-cli
13
+ 安装成功后输入:tmui
14
+ 即可查看所有可用命令
15
+ ```
16
+
17
+ #### 使用
18
+ 请在项目文件的根目录下执行命令
19
+ 输入 ```tmui```
20
+ 即可取得所有可控的命令行
21
+
22
+ #### 命令解释
23
+
24
+ 0. tmui cli 创建uniapp 平台的cli初始项目,内部已经包含了tmui最新框架(自动更新)
25
+ 1. tmui hbx 创建uniapp 平台的HBX初始项目,内部已经包含了tmui最新框架(自动更新)
26
+ 2. tmui rcli 为【已有】uniapp 平台的cli项目,更新和下载tmui最新框架(自动更新)
27
+ 3. tmui rhbx 为【已有】uniapp 平台的HBX项目,更新和下载tmui最新框架(自动更新)
28
+ 4. tmui use 为保姆级引导式下载安装上述功能项目。
29
+
30
+ #### 注意事项
31
+ 如果你是需要创建tmui新项目可以使用命令行创建全新的项目。<br>
32
+ 如果你是为老项目添加本tmui框架,你下载安装后,还需要按照文档步骤配置 [配置](https://tmui.design/doc/start/%E5%BF%AB%E9%80%9F%E4%B8%8A%E6%89%8B.html)<br>
33
+ 如果是全新的使用本cli创建项目,则是一键配置到位,安装完立即就可以编译出一个tmui 程序的demo
34
+
35
+
36
+
37
+ [![star](https://gitee.com/LYTB/tmui-design/badge/star.svg?theme=dark)](https://gitee.com/LYTB/tmui-design/stargazers) [![fork](https://gitee.com/LYTB/tmui-design/badge/fork.svg?theme=dark)](https://gitee.com/LYTB/tmui-design/members)
38
+
39
+ ### [tmui3.0开发文档](https://tmui.design/)
40
+
41
+ TMUI 3.0有以下可见的优势方案执行未来的发展:
42
+ - 暗黑模式更为可靠
43
+ - 主题配置更为简单
44
+ - 组件库精细化打磨
45
+ - 依托UNIAPP全平台兼容性,以原生渲染为基础的全平台兼容。
46
+ - 常用功能组件不断迭代更新发布
47
+ - 各组件样式设置丰富,不局限,尽量能做到千人千面。
48
+ - 各组件经过微信开发工具的性能测试>=96分以上
49
+
50
+ [![同名自定义/tmui design](https://gitee.com/LYTB/tmui-design/widgets/widget_card.svg?colors=393222,ebdfc1,fffae5,d8ca9f,393222,a28b40)](https://gitee.com/LYTB/tmui-design)
51
+
52
+ [tmui2.0文档](https://ext.dcloud.net.cn/plugin?id=5949)
53
+
54
+ ### [注意事项](https://ext.dcloud.net.cn/plugin?name=tm-ui)
55
+
56
+ - 提出建议和bug,请访问码云代码库:[点击打开](https://gitee.com/LYTB/tmui-design)
57
+ ,并反馈相关bug或者建议.
58
+
59
+ ---
60
+ ### [贡献者](https://tmui.design/doc/start/%E8%B4%A1%E7%8C%AE%E8%80%85.html#%E8%B4%A1%E7%8C%AE%E4%BA%BA%E5%91%98)
61
+ 在伟大的无私贡献人员帮助下,使得此开源项目的可持续性发展更加的持久。他/她们理应得到展示,并为大家所知。不管是如何的贡献,哪怕很小的一部分也值得称赞!!<br>
62
+ 点击图片查看更多
63
+
64
+ [![](https://vkceyugu.cdn.bspapp.com/VKCEYUGU-f5b1722f-8766-40af-a22a-acc454202a37/ef8a8962-1153-44c9-aee5-6a616996e595.jpg)](https://tmui.design/doc/start/%E8%B4%A1%E7%8C%AE%E8%80%85.html)
65
+
66
+ **微信用户群2** <br>
67
+ ![用户群](https://cdn.tmui.design/public/design/weixinQR2.jpg)
68
+
69
+ ----
70
+
71
+ ### 版本预览
72
+
73
+ ![tmui3.0 预览](https://cdn.tmui.design/public/design/verHeji.jpg)
74
+
75
+ ----
76
+
77
+ ### 赞助项目,以持续更新
78
+
79
+ 如果帮到了你,适当的赞助有助力作者成果上的回报,报以项目的持续更新。
80
+
81
+ ![tmui3.0 赞助](https://cdn.tmui.design/public/design/payzhanzhu.jpg)
82
+
83
+ ----
84
+
85
+ ### 3.0.4新功能特性快速了解
86
+
87
+ ![3.0.4](https://vkceyugu.cdn.bspapp.com/VKCEYUGU-f5b1722f-8766-40af-a22a-acc454202a37/86bce318-d3a0-4c88-8e9c-cd764fed81e1.gif)
88
+ ![3.0.4](https://vkceyugu.cdn.bspapp.com/VKCEYUGU-f5b1722f-8766-40af-a22a-acc454202a37/f33285fd-5f26-4092-95a2-2fe8f4aee2ed.gif)
89
+
90
+ ![tmui预览图](https://vkceyugu.cdn.bspapp.com/VKCEYUGU-f5b1722f-8766-40af-a22a-acc454202a37/0672c1be-2519-4e36-962b-072852193025.png)
package/bin/tmui.js CHANGED
@@ -1,76 +1,133 @@
1
- #!/usr/bin/env node
2
-
3
- process.title = 'tmui3.0-cli';
1
+ #!/usr/bin/env node
2
+
3
+ process.title = 'tmui3.0-cli';
4
4
  const chalk = import("chalk")
5
- const { Command } = require('commander');
5
+ const { Command } = require('commander');
6
6
  const program = new Command();
7
7
  const create = require("../src/create")
8
8
  const createHbx = require("../src/createHbx")
9
9
  const rhbx = require("../src/rhbx")
10
10
  const rcli = require("../src/rcli")
11
11
  const viewTmuiVer = require("../src/viewTmuiVer")
12
-
12
+ const tm2 = require("../src/tmui2")
13
+ const inquirer = import('inquirer');
14
+ const ft = import("node-fetch")
13
15
  chalk.then(v=>{
14
16
  const ck = new v.Chalk();
15
- console.log(ck.green(`---------------------------------------------------`))
16
- console.log(ck.green(`---------------------------------------------------`))
17
- console.log(ck.green(`tmui3.0`))
18
- console.log(ck.green(`欢迎使用tmui3.0 cli 命令行工具`))
19
- console.log(ck.green(`将引导你创建一个tmui3.0组件框架的UNIAPP项目`))
20
- console.log(ck.green(`文档地址:https://tmui.design.com`))
21
- console.log(ck.green(`---------------------------------------------------`))
22
- console.log(ck.green(`---------------------------------------------------`))
23
- program
24
- .version(require('../package').version)
25
- program.command('cli')
26
- .description('[可选指定版本号] 创建cli uniapp tmui3.0 项目[推荐]')
27
- .action(function(type, name){
28
- create.run(type,name)
29
- })
30
- program.command('hbx')
31
- .description('[可选指定版本号] 创建hbx uniapp tmui3.0 项目[不推荐]')
32
- .action(function(type, name){
33
- createHbx.run(type,name)
34
- })
35
- program.command('rcli')
36
- .description('[可选指定版本号] 已有cli项目下载/更新tmui3.0')
37
- .action(function(type, name){
38
- rcli.run(type,name)
39
- })
40
- program.command('rhbx')
41
- .description('[可选指定版本号] 已有hbx项目下载/更新tmui3.0')
42
- .action(function(type, name){
43
- rhbx.run(type,name)
44
- })
45
- program.command('ver')
46
- .description('查看tmui可用版本号')
47
- .action(function(type, name){
48
- viewTmuiVer.run(type,name)
49
- })
50
- program.command('use')
51
- .description('如何使用本命令行?')
52
- .action(function(type, name){
53
- console.log(ck.green(`全局安装本命令 npm -g install tmui-cli`))
54
- console.log(ck.green(`在你已有/空目录下创建/更新组件。`))
55
- console.log(ck.green(`比如在空目录下创建新的cli项目可以使用如下命令:`))
56
- console.log(ck.bgGreen(`tmui cli`))
57
- console.log(ck.green(`创建指定cli项目的tmui 版本号`))
58
- console.log(ck.bgGreen(`tmui cli 3.0.78`))
59
- })
60
-
61
- program.parse();
62
-
17
+ console.log(ck.white(`---------------------------------------------------`))
18
+ console.log(ck.white(`---------------------------------------------------`))
19
+ console.log(ck.white(`tmui3.0`))
20
+ console.log(ck.white(`欢迎使用tmui3.0 cli 命令行工具`))
21
+ console.log(ck.white(`将引导你创建一个tmui3.0组件框架的UNIAPP项目`))
22
+ console.log(ck.green(`文档地址:https://tmui.design`))
23
+ console.log(ck.white(`---------------------------------------------------`))
24
+ console.log(ck.white(`---------------------------------------------------`))
25
+ inquirer.then(ivk=>{
26
+ program
27
+ .version(require('../package').version)
28
+ program.command('cli')
29
+ .description('[可选指定版本号] 创建cli uniapp tmui3.0 项目[推荐]')
30
+ .action(function(type, name){
31
+ create.run(type,name)
32
+ })
33
+ program.command('hbx')
34
+ .description('[可选指定版本号] 创建hbx uniapp tmui3.0 项目[不推荐]')
35
+ .action(function(type, name){
36
+ createHbx.run(type,name)
37
+ })
38
+ program.command('rcli')
39
+ .description('[可选指定版本号] 已有cli项目下载/更新tmui3.0')
40
+ .action(function(type, name){
41
+ rcli.run(type,name)
42
+ })
43
+ program.command('rhbx')
44
+ .description('[可选指定版本号] 已有hbx项目下载/更新tmui3.0')
45
+ .action(function(type, name){
46
+ rhbx.run(type,name)
47
+ })
48
+ program.command('ver')
49
+ .description('查看tmui可用版本号')
50
+ .action(function(type, name){
51
+ viewTmuiVer.run(type,name)
52
+ })
53
+ program.command('use')
54
+ .description('引导式安装tmui组件!!!')
55
+ .action(function(type, name){
56
+ const { prompt,Separator} = ivk.default;
57
+ prompt([
58
+ {
59
+ type: 'list',
60
+ name: 'tmuiVerName',
61
+ message: '请选择你的uniApp项目的vue版本',
62
+ choices: [
63
+ 'vue2',
64
+ 'vue3'
65
+ ],
66
+ }
67
+ ])
68
+ .then((answers) => {
69
+ if(answers.tmuiVerName=="vue2"){
70
+ console.log("tmui2.0版本只支持uniApp HBX项目,请务必当前目录在你的项目文件夹下/或者一个空文件都可以。")
71
+ console.log("正在为你的项目下载/更新tmui2.0的最新版本。")
72
+ tm2.run()
73
+ }else if(answers.tmuiVerName=='vue3'){
63
74
 
64
-
65
-
66
-
67
- // cm
68
- // .Option()
69
- // .version(require('../package').version)
70
- // .usage('<命令> [参数]')
71
- // .command('create', '创建一个UNIAPP cli项目')
72
- // .parse(process.argv)
75
+ ft.then((fah)=>{
76
+ const fetch = fah.default
77
+ fetch('https://cdn.tmui.design/tmuiVer.txt').then(async (res)=>{
78
+ let verText = await res.text();
79
+ let lastVer = verText.split('\n').slice(0,10)
80
+ prompt([
81
+ {
82
+ type: 'list',
83
+ name: 'moshi',
84
+ message: '选择安装方式:',
85
+ choices: [
86
+ 'cli',
87
+ 'rcli',
88
+ 'hbx',
89
+ 'rhbx',
90
+ ],
91
+ },
92
+ {
93
+ type: 'list',
94
+ name: 'ver',
95
+ message: '选择最近的版本号',
96
+ choices: lastVer,
97
+ },
98
+
99
+ ])
100
+ .then((answers) => {
101
+ let ms = answers.moshi;
102
+ let ver = answers.ver.trim()
103
+ if(!ver||typeof ver=="undefined"){
104
+ console.log(ck.red("请正确输入版本号"))
105
+ return;
106
+ }
107
+ if(ms=="cli"){
108
+ create.run(null,null,ver)
109
+ }else if(ms=="rcli"){
110
+ rcli.run(null,null,ver)
111
+ }else if(ms=="hbx"){
112
+ createHbx.run(null,null,ver)
113
+ }else if(ms=="rhbx"){
114
+ rhbx.run(null,null,ver)
115
+ }
116
+ })
117
+ })
118
+
119
+ })
120
+
121
+ }
122
+ });
123
+
124
+
125
+ })
126
+ program.parse();
127
+
128
+ })
129
+
73
130
 
74
131
  })
75
132
 
76
-
133
+
package/package.json CHANGED
@@ -1,22 +1,50 @@
1
1
  {
2
- "name": "tmui-cli",
3
- "version": "1.0.3",
4
- "description": "tmui3.0",
5
- "main": "./bin/tmui.js",
6
- "scripts": {},
7
- "bin": {
8
- "tmui": "./bin/tmui.js"
2
+ "_from": "tmui-cli",
3
+ "_id": "tmui-cli@1.0.3",
4
+ "_inBundle": false,
5
+ "_integrity": "sha512-mnddgPs3eUjTuxQGv6hxlc0b98d53YXtjd0tvrlzWvrAnf0IS0qQMo4bZHi+ImwOEYqbNLX9jhd9pq1cVb9tjw==",
6
+ "_location": "/tmui-cli",
7
+ "_phantomChildren": {},
8
+ "_requested": {
9
+ "type": "tag",
10
+ "registry": true,
11
+ "raw": "tmui-cli",
12
+ "name": "tmui-cli",
13
+ "escapedName": "tmui-cli",
14
+ "rawSpec": "",
15
+ "saveSpec": null,
16
+ "fetchSpec": "latest"
9
17
  },
10
- "keywords": [
11
- "tmui",
12
- "tm-vuetify"
18
+ "_requiredBy": [
19
+ "#USER"
13
20
  ],
14
- "author": "tmzdy tmui",
15
- "license": "ISC",
21
+ "_resolved": "https://registry.npmjs.org/tmui-cli/-/tmui-cli-1.0.3.tgz",
22
+ "_shasum": "162803da7d6cc696e3f4a908b223a15f0b33d245",
23
+ "_spec": "tmui-cli",
24
+ "_where": "C:\\Users\\zsylp",
25
+ "author": {
26
+ "name": "tmzdy tmui"
27
+ },
28
+ "bin": {
29
+ "tmui": "bin/tmui.js"
30
+ },
31
+ "bundleDependencies": false,
16
32
  "dependencies": {
17
33
  "chalk": "^5.0.1",
18
34
  "commander": "^9.4.0",
19
35
  "compressing": "^1.6.2",
36
+ "inquirer": "^9.1.0",
20
37
  "node-fetch": "^3.2.10"
21
- }
38
+ },
39
+ "deprecated": false,
40
+ "description": "tmui3.0",
41
+ "keywords": [
42
+ "tmui",
43
+ "tm-vuetify"
44
+ ],
45
+ "license": "ISC",
46
+ "main": "./bin/tmui.js",
47
+ "name": "tmui-cli",
48
+ "scripts": {},
49
+ "version": "1.0.6"
22
50
  }
package/src/create.js CHANGED
@@ -4,32 +4,34 @@ const fs = require("fs")
4
4
  const ft = import("node-fetch")
5
5
  const compressing = require("compressing")
6
6
  const chilPro = require("child_process")
7
- exports.run = function(type, name) {
7
+
8
+ exports.run = function(type, name,vr) {
8
9
  chalk.then(v=>{
9
10
  const ck = new v.Chalk();
10
11
  const nowPath = path.resolve('./');
11
12
  console.log(ck.bgBlue('不 要 关闭窗体,正在创建中....'))
12
13
  let userInputVer = "";
13
- let args = name.parent.rawArgs.filter(el=>{
14
- return el
15
- })
16
-
17
- if(args.includes('-c')){
18
- if(args.length==5){
14
+ if(vr!=null){
15
+ userInputVer = vr;
16
+ }else{
17
+ let args = name.parent.rawArgs.filter(el=>{
18
+ return el
19
+ })
20
+ if(args.includes('-c')){
21
+ if(args.length==5){
22
+ userInputVer = args.pop()||""
23
+ userInputVer = typeof userInputVer=='undefined'?"":userInputVer
24
+ }
25
+ }else if(args.length==4){
19
26
  userInputVer = args.pop()||""
20
27
  userInputVer = typeof userInputVer=='undefined'?"":userInputVer
21
28
  }
22
- }else if(args.length==4){
23
- userInputVer = args.pop()||""
24
- userInputVer = typeof userInputVer=='undefined'?"":userInputVer
25
29
  }
26
30
 
27
-
28
31
  // 检查是否有router目录?
29
32
  // fs.existsSync(path.join(nowPath,'router','index.ts'))
30
33
  ft.then((fah)=>{
31
34
  const fetch = fah.default
32
-
33
35
  fetch('https://cdn.tmui.design/tmuiVer.txt').then(async (res)=>{
34
36
  let verText = await res.text();
35
37
  let ver = verText.split('\n')[0]
@@ -76,7 +78,9 @@ exports.run = function(type, name) {
76
78
  fs.unlinkSync(path.join(nowPath,'cli.zip'))
77
79
  }
78
80
  console.log(ck.bgGreen('清理成功,正在安装依赖时间稍长~'))
79
- chilPro.exec('npm install',error=>{
81
+
82
+ const installNpm = chilPro.exec('npm install',(error, stdout, stderr)=>{
83
+
80
84
  if(error){
81
85
  console.log('安装失败,请在当前目录手动安装依赖文件执行:',ck.bgRed(error))
82
86
  console.log(ck.green('npm install'))
@@ -89,6 +93,11 @@ exports.run = function(type, name) {
89
93
  console.log(ck.green('npm run dev:h5'))
90
94
  console.log(ck.green('在本窗口输入上述命令,按回车键编译。'))
91
95
  })
96
+
97
+ installNpm.stdout?.on("data",(msg)=>{
98
+ console.log(msg.toString('utf8'))
99
+ })
100
+
92
101
  }).catch(err=>{
93
102
  console.log(ck.bgRed(err))
94
103
  })
package/src/createHbx.js CHANGED
@@ -4,24 +4,27 @@ const fs = require("fs")
4
4
  const ft = import("node-fetch")
5
5
  const compressing = require("compressing")
6
6
  const chilPro = require("child_process")
7
- exports.run = function(type, name) {
7
+ exports.run = function(type, name,vr) {
8
8
  chalk.then(v=>{
9
9
  const ck = new v.Chalk();
10
10
  const nowPath = path.resolve('./');
11
11
  console.log(ck.bgBlue('不 要 关闭窗体,正在创建中....'))
12
12
  let userInputVer = "";
13
- let args = name.parent.rawArgs.filter(el=>{
14
- return el
15
- })
16
-
17
- if(args.includes('-c')){
18
- if(args.length==5){
13
+ if(vr!=null){
14
+ userInputVer = vr;
15
+ }else{
16
+ let args = name.parent.rawArgs.filter(el=>{
17
+ return el
18
+ })
19
+ if(args.includes('-c')){
20
+ if(args.length==5){
21
+ userInputVer = args.pop()||""
22
+ userInputVer = typeof userInputVer=='undefined'?"":userInputVer
23
+ }
24
+ }else if(args.length==4){
19
25
  userInputVer = args.pop()||""
20
26
  userInputVer = typeof userInputVer=='undefined'?"":userInputVer
21
27
  }
22
- }else if(args.length==4){
23
- userInputVer = args.pop()||""
24
- userInputVer = typeof userInputVer=='undefined'?"":userInputVer
25
28
  }
26
29
 
27
30
  ft.then((fah)=>{
package/src/rcli.js CHANGED
@@ -4,24 +4,27 @@ const fs = require("fs")
4
4
  const ft = import("node-fetch")
5
5
  const compressing = require("compressing")
6
6
  const chilPro = require("child_process")
7
- exports.run = function(type, name) {
7
+ exports.run = function(type, name,vr) {
8
8
  chalk.then(v=>{
9
9
  const ck = new v.Chalk();
10
10
  const nowPath = path.resolve('./');
11
11
  console.log(ck.bgBlue('不 要 关闭窗体,正在创建中....'))
12
12
  let userInputVer = "";
13
- let args = name.parent.rawArgs.filter(el=>{
14
- return el
15
- })
16
-
17
- if(args.includes('-c')){
18
- if(args.length==5){
13
+ if(vr!=null){
14
+ userInputVer = vr;
15
+ }else{
16
+ let args = name.parent.rawArgs.filter(el=>{
17
+ return el
18
+ })
19
+ if(args.includes('-c')){
20
+ if(args.length==5){
21
+ userInputVer = args.pop()||""
22
+ userInputVer = typeof userInputVer=='undefined'?"":userInputVer
23
+ }
24
+ }else if(args.length==4){
19
25
  userInputVer = args.pop()||""
20
26
  userInputVer = typeof userInputVer=='undefined'?"":userInputVer
21
27
  }
22
- }else if(args.length==4){
23
- userInputVer = args.pop()||""
24
- userInputVer = typeof userInputVer=='undefined'?"":userInputVer
25
28
  }
26
29
  ft.then((fah)=>{
27
30
  const fetch = fah.default
package/src/rhbx.js CHANGED
@@ -4,24 +4,27 @@ const fs = require("fs")
4
4
  const ft = import("node-fetch")
5
5
  const compressing = require("compressing")
6
6
  const chilPro = require("child_process")
7
- exports.run = function(type, name) {
7
+ exports.run = function(type, name,vr) {
8
8
  chalk.then(v=>{
9
9
  const ck = new v.Chalk();
10
10
  const nowPath = path.resolve('./');
11
11
  console.log(ck.bgBlue('不 要 关闭窗体,正在创建中....'))
12
12
  let userInputVer = "";
13
- let args = name.parent.rawArgs.filter(el=>{
14
- return el
15
- })
16
-
17
- if(args.includes('-c')){
18
- if(args.length==5){
13
+ if(vr!=null){
14
+ userInputVer = vr;
15
+ }else{
16
+ let args = name.parent.rawArgs.filter(el=>{
17
+ return el
18
+ })
19
+ if(args.includes('-c')){
20
+ if(args.length==5){
21
+ userInputVer = args.pop()||""
22
+ userInputVer = typeof userInputVer=='undefined'?"":userInputVer
23
+ }
24
+ }else if(args.length==4){
19
25
  userInputVer = args.pop()||""
20
26
  userInputVer = typeof userInputVer=='undefined'?"":userInputVer
21
27
  }
22
- }else if(args.length==4){
23
- userInputVer = args.pop()||""
24
- userInputVer = typeof userInputVer=='undefined'?"":userInputVer
25
28
  }
26
29
 
27
30
  if(fs.existsSync(path.join(nowPath,'router','index.ts'))){
package/src/tmui2.js ADDED
@@ -0,0 +1,60 @@
1
+ const chalk = import("chalk")
2
+ const path = require("path")
3
+ const fs = require("fs")
4
+ const ft = import("node-fetch")
5
+ const compressing = require("compressing")
6
+ const chilPro = require("child_process")
7
+ exports.run = function() {
8
+ chalk.then(v=>{
9
+ const ck = new v.Chalk();
10
+ const nowPath = path.resolve('./');
11
+ console.log(ck.bgBlue('不 要 关闭窗体,正在创建中....'))
12
+
13
+ ft.then((fah)=>{
14
+ const fetch = fah.default
15
+ //创建tmui目录
16
+ let tmuipath = path.join(nowPath,'tm-vuetify');
17
+ if(!fs.existsSync(tmuipath)){
18
+ fs.mkdirSync(tmuipath);
19
+ }
20
+
21
+ fetch('https://cdn.tmui.design/tmui2.0Ver.txt').then(async (res)=>{
22
+ let verText = await res.text();
23
+ let ver = verText.split('\n')[0]
24
+
25
+ let isVer = verText.includes(ver)
26
+ if(!isVer){
27
+ console.log(ck.red('不存在版本号:'+ver))
28
+ return;
29
+ }
30
+ console.log(ck.green(`---------------------------------------------------`))
31
+ console.log(ck.green('正在使用版本号:'+ver))
32
+ console.log(ck.green(`---------------------------------------------------`))
33
+ console.log(ck.bgBlue('不 要 关闭窗体,正在创建中....'))
34
+ //下载tmui
35
+ let donloadTmui = `https://cdn.tmui.design/public/static/tmui${ver}.zip`
36
+ fetch(donloadTmui).then(async (tmuires)=>{
37
+ fs.writeFileSync(path.join(nowPath,'tmui.zip'),await tmuires.buffer())
38
+ compressing.zip.uncompress(path.join(nowPath,'tmui.zip'),tmuipath)
39
+ .then(comtmui=>{
40
+
41
+ if(fs.existsSync(path.join(nowPath,'tmui.zip'))){
42
+ fs.unlinkSync(path.join(nowPath,'tmui.zip'))
43
+ }
44
+ console.log(ck.bgGreen('已成功将tmui2.0下载至你的项目根目录下!'))
45
+ console.log(ck.bgGreen('具体安装配置流程见文档:https://jx2d.cn'))
46
+
47
+ }).catch(err=>{
48
+ console.log(ck.bgRed(err))
49
+ })
50
+ })
51
+ .catch(e=>{
52
+ console.log(ck.bgRed(e))
53
+ })
54
+ })
55
+
56
+
57
+ })
58
+ // fetch()tmuiVer.txt
59
+ })
60
+ }
package/READE.md DELETED
File without changes