tmui-cli 1.0.9 → 1.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "_from": "tmui-cli",
3
- "_id": "tmui-cli@1.0.9",
3
+ "_id": "tmui-cli@1.1.1",
4
4
  "_inBundle": false,
5
5
  "_integrity": "sha512-mnddgPs3eUjTuxQGv6hxlc0b98d53YXtjd0tvrlzWvrAnf0IS0qQMo4bZHi+ImwOEYqbNLX9jhd9pq1cVb9tjw==",
6
6
  "_location": "/tmui-cli",
@@ -49,5 +49,5 @@
49
49
  "main": "./bin/tmui.js",
50
50
  "name": "tmui-cli",
51
51
  "scripts": {},
52
- "version": "1.0.9"
52
+ "version": "1.1.1"
53
53
  }
package/src/createHbx.js CHANGED
@@ -83,7 +83,7 @@ exports.run = function(type, name,vr,packname="npm") {
83
83
  fs.unlinkSync(path.join(nowPath,'tmuiHBX.zip'))
84
84
  }
85
85
  console.log(ck.bgGreen('清理成功,正在安装依赖时间稍长~'))
86
- chilPro.exec('npm install echarts --save',error=>{
86
+ chilPro.exec(packname+' install echarts --save',error=>{
87
87
  countdown.stop()
88
88
  if(error){
89
89
  console.log('安装失败,请在当前目录手动安装依赖文件执行:',ck.bgRed(error))
package/src/rcli.js CHANGED
@@ -81,7 +81,7 @@ exports.run = function(type, name,vr,packname="npm") {
81
81
  }
82
82
  console.log(ck.bgGreen('清理成功,正在安装依赖时间稍长~'))
83
83
  clear()
84
- chilPro.exec('npm install',error=>{
84
+ chilPro.exec(packname+' install',error=>{
85
85
  countdown.stop()
86
86
  if(error){
87
87
  console.log('安装失败,请在当前目录手动安装依赖文件执行:',ck.bgRed(error))
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
 
@@ -95,7 +95,7 @@ exports.run = function(type, name,vr,packname="npm") {
95
95
  }
96
96
 
97
97
  console.log(ck.bgGreen('清理成功,正在安装依赖时间稍长~'))
98
- chilPro.exec('npm install echarts --save',error=>{
98
+ chilPro.exec(packname+' install echarts --save',error=>{
99
99
  countdown.stop()
100
100
  if(error){
101
101
  console.log('安装失败,请在当前目录手动安装依赖文件执行:',ck.bgRed(error))