tmui-cli 1.1.0 → 1.1.2

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/bin/tmui.js CHANGED
@@ -25,32 +25,31 @@ chalk.then(v=>{
25
25
  return;
26
26
  }
27
27
  console.log(ck.white(`---------------------------------------------------`))
28
- console.log(ck.white(`---------------------------------------------------`))
29
28
  console.log(ck.green(data))
30
29
  console.log(ck.green(`文档地址:https://tmui.design`))
31
30
  console.log(ck.white(`---------------------------------------------------`))
31
+ console.log(ck.white(`命令使用方式为:tmui xxx命令 比如:tmui use`))
32
32
  console.log(ck.white(`---------------------------------------------------`))
33
-
34
33
  inquirer.then(ivk=>{
35
34
  program
36
35
  .version(require('../package').version)
37
36
  program.command('cli')
38
- .description('[可选指定版本号] 创建cli uniapp tmui3.0 项目[推荐]')
37
+ .description('创建uniapp的cli项目包含tmui3.0[推荐]')
39
38
  .action(function(type, name){
40
39
  create.run(type,name)
41
40
  })
42
41
  program.command('hbx')
43
- .description('[可选指定版本号] 创建hbx uniapp tmui3.0 项目[不推荐]')
42
+ .description('创建uniapp的hbx项目包含tmui3.0[不推荐]')
44
43
  .action(function(type, name){
45
44
  createHbx.run(type,name)
46
45
  })
47
46
  program.command('rcli')
48
- .description('[可选指定版本号] 已有cli项目下载/更新tmui3.0')
47
+ .description('cli项目下载/更新tmui3.0')
49
48
  .action(function(type, name){
50
49
  rcli.run(type,name)
51
50
  })
52
51
  program.command('rhbx')
53
- .description('[可选指定版本号] 已有hbx项目下载/更新tmui3.0')
52
+ .description('hbx项目下载/更新tmui3.0')
54
53
  .action(function(type, name){
55
54
  rhbx.run(type,name)
56
55
  })
@@ -60,7 +59,7 @@ chalk.then(v=>{
60
59
  viewTmuiVer.run(type,name)
61
60
  })
62
61
  program.command('use')
63
- .description('引导式安装tmui组件!!!')
62
+ .description('引导式安装tmui3.0项目[自定义安装]')
64
63
  .action(function(type, name){
65
64
  const { prompt,Separator} = ivk.default;
66
65
  prompt([
package/package.json CHANGED
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "_from": "tmui-cli",
3
- "_id": "tmui-cli@1.1.0",
4
3
  "_inBundle": false,
5
4
  "_integrity": "sha512-mnddgPs3eUjTuxQGv6hxlc0b98d53YXtjd0tvrlzWvrAnf0IS0qQMo4bZHi+ImwOEYqbNLX9jhd9pq1cVb9tjw==",
6
5
  "_location": "/tmui-cli",
@@ -49,5 +48,5 @@
49
48
  "main": "./bin/tmui.js",
50
49
  "name": "tmui-cli",
51
50
  "scripts": {},
52
- "version": "1.1.0"
51
+ "version": "1.1.2"
53
52
  }
package/src/rhbx.js CHANGED
@@ -35,18 +35,18 @@ exports.run = function(type, name,vr,packname="npm") {
35
35
  }
36
36
  }
37
37
 
38
- if(fs.existsSync(path.join(nowPath,'router','index.ts'))){
38
+ if(!fs.existsSync(path.join(nowPath,'router','index.ts'))){
39
39
  if(!fs.existsSync(path.join(nowPath,'router'))){
40
40
  fs.mkdirSync(path.join(nowPath,'router'));
41
41
  }
42
42
  let txt = require('./router').txt;
43
43
  fs.writeFileSync(path.join(nowPath,'router','index.ts'),txt)
44
44
  }
45
- if(fs.existsSync(path.join(nowPath,'theme','index.ts'))){
45
+ if(!fs.existsSync(path.join(nowPath,'theme','index.ts'))){
46
46
  if(!fs.existsSync(path.join(nowPath,'theme'))){
47
47
  fs.mkdirSync(path.join(nowPath,'theme'));
48
48
  }
49
- let txt = require('./router').txt;
49
+ let txt = require('./theme').txt;
50
50
  fs.writeFileSync(path.join(nowPath,'theme','index.ts'),txt)
51
51
  }
52
52
 
package/src/util.js CHANGED
@@ -30,6 +30,8 @@ function delFile(fileUrl, flag) {
30
30
  }
31
31
  }
32
32
 
33
+ /**检查 uni cli的最新版本号。*/
34
+
33
35
  exports.default= {
34
36
  delFile
35
37
  }