tmui-cli 1.0.8 → 1.1.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/bin/tmui.js CHANGED
@@ -104,23 +104,35 @@ chalk.then(v=>{
104
104
  message: '选择最近的版本号',
105
105
  choices: lastVer,
106
106
  },
107
+ {
108
+ type: 'list',
109
+ name: 'pack',
110
+ message: '选择你的包管理框架',
111
+ choices: [
112
+ 'npm',
113
+ 'yarn',
114
+ 'pnpm',
115
+ 'cnpm',
116
+ ],
117
+ },
107
118
 
108
119
  ])
109
120
  .then((answers) => {
110
121
  let ms = answers.moshi;
111
122
  let ver = answers.ver.trim()
123
+ let packname=answers.pack.trim()
112
124
  if(!ver||typeof ver=="undefined"){
113
125
  console.log(ck.red("请正确输入版本号"))
114
126
  return;
115
127
  }
116
128
  if(ms=="cli"){
117
- create.run(null,null,ver)
129
+ create.run(null,null,ver,packname)
118
130
  }else if(ms=="rcli"){
119
- rcli.run(null,null,ver)
131
+ rcli.run(null,null,ver,packname)
120
132
  }else if(ms=="hbx"){
121
- createHbx.run(null,null,ver)
133
+ createHbx.run(null,null,ver,packname)
122
134
  }else if(ms=="rhbx"){
123
- rhbx.run(null,null,ver)
135
+ rhbx.run(null,null,ver,packname)
124
136
  }
125
137
  })
126
138
  })
package/package.json CHANGED
@@ -1,53 +1,53 @@
1
- {
2
- "_from": "tmui-cli",
3
- "_id": "tmui-cli@1.0.8",
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"
17
- },
18
- "_requiredBy": [
19
- "#USER"
20
- ],
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,
32
- "dependencies": {
33
- "chalk": "^5.0.1",
34
- "clear": "^0.1.0",
35
- "clui": "^0.3.6",
36
- "commander": "^9.4.0",
37
- "compressing": "^1.6.2",
38
- "figlet": "^1.5.2",
39
- "inquirer": "^9.1.0",
40
- "node-fetch": "^3.2.10"
41
- },
42
- "deprecated": false,
43
- "description": "tmui3.0",
44
- "keywords": [
45
- "tmui",
46
- "tm-vuetify"
47
- ],
48
- "license": "ISC",
49
- "main": "./bin/tmui.js",
50
- "name": "tmui-cli",
51
- "scripts": {},
52
- "version": "1.0.8"
53
- }
1
+ {
2
+ "_from": "tmui-cli",
3
+ "_id": "tmui-cli@1.1.0",
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"
17
+ },
18
+ "_requiredBy": [
19
+ "#USER"
20
+ ],
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,
32
+ "dependencies": {
33
+ "chalk": "^5.0.1",
34
+ "clear": "^0.1.0",
35
+ "clui": "^0.3.6",
36
+ "commander": "^9.4.0",
37
+ "compressing": "^1.6.2",
38
+ "figlet": "^1.5.2",
39
+ "inquirer": "^9.1.0",
40
+ "node-fetch": "^3.2.10"
41
+ },
42
+ "deprecated": false,
43
+ "description": "tmui3.0",
44
+ "keywords": [
45
+ "tmui",
46
+ "tm-vuetify"
47
+ ],
48
+ "license": "ISC",
49
+ "main": "./bin/tmui.js",
50
+ "name": "tmui-cli",
51
+ "scripts": {},
52
+ "version": "1.1.0"
53
+ }
package/src/create.js CHANGED
@@ -10,7 +10,7 @@ var CLI = require('clui'),
10
10
  Spinner = CLI.Spinner;
11
11
  var countdown = new Spinner('请等待... ', ['/','\\','/','\\']);
12
12
  const delFile = require("./util").default.delFile
13
- exports.run = function(type, name,vr) {
13
+ exports.run = function(type, name,vr,packname="npm") {
14
14
  chalk.then(v=>{
15
15
  const ck = new v.Chalk();
16
16
  const nowPath = path.resolve('./');
@@ -84,12 +84,12 @@ exports.run = function(type, name,vr) {
84
84
  fs.unlinkSync(path.join(nowPath,'cli.zip'))
85
85
  }
86
86
  countdown.message(ck.green('正在安装依赖'))
87
- const installNpm = chilPro.exec('npm install',(error, stdout, stderr)=>{
87
+ const installNpm = chilPro.exec(packname+' install',(error, stdout, stderr)=>{
88
88
 
89
89
  if(error){
90
90
  countdown.stop()
91
91
  console.log('安装失败,请在当前目录手动安装依赖文件执行:',ck.bgRed(error))
92
- console.log(ck.green('npm install'))
92
+ console.log(ck.green(packname+' install'))
93
93
  return
94
94
  }
95
95
  countdown.stop()
@@ -104,7 +104,7 @@ exports.run = function(type, name,vr) {
104
104
  console.log(ck.green(`---------------------------------------------------`))
105
105
  console.log(ck.green(`---------------------------------------------------`))
106
106
  console.log(ck.green('安装成功请执行uni cli命令,编译一个H5项目试:'))
107
- console.log(ck.green('npm run dev:h5'))
107
+ console.log(ck.green(packname+' run dev:h5'))
108
108
  console.log(ck.green('在本窗口输入上述命令,按回车键编译。'))
109
109
  })
110
110
 
package/src/createHbx.js CHANGED
@@ -10,7 +10,7 @@ var CLI = require('clui'),
10
10
  Spinner = CLI.Spinner;
11
11
  const delFile = require("./util").default.delFile
12
12
  var countdown = new Spinner('请等待... ', ['/','\\','/','\\']);
13
- exports.run = function(type, name,vr) {
13
+ exports.run = function(type, name,vr,packname="npm") {
14
14
  chalk.then(v=>{
15
15
  clear()
16
16
  const ck = new v.Chalk();
@@ -83,11 +83,11 @@ exports.run = function(type, name,vr) {
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))
90
- console.log(ck.green('npm install'))
90
+ console.log(ck.green(packname+' install'))
91
91
  return
92
92
  }
93
93
  clear()
package/src/rcli.js CHANGED
@@ -10,7 +10,7 @@ var CLI = require('clui'),
10
10
  Spinner = CLI.Spinner;
11
11
  var countdown = new Spinner('请等待... ', ['/','\\','/','\\']);
12
12
  const delFile = require("./util").default.delFile
13
- exports.run = function(type, name,vr) {
13
+ exports.run = function(type, name,vr,packname="npm") {
14
14
  chalk.then(v=>{
15
15
  const ck = new v.Chalk();
16
16
  const nowPath = path.resolve('./');
@@ -81,11 +81,11 @@ exports.run = function(type, name,vr) {
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))
88
- console.log(ck.green('npm install'))
88
+ console.log(ck.green(packname+' install'))
89
89
  return
90
90
  }
91
91
 
@@ -99,7 +99,7 @@ exports.run = function(type, name,vr) {
99
99
  console.log(ck.green(`---------------------------------------------------`))
100
100
  console.log(ck.green(`---------------------------------------------------`))
101
101
  console.log(ck.green('安装成功 请执行uni cli命令,编译一个H5项目试:'))
102
- console.log(ck.green('npm run dev:h5'))
102
+ console.log(ck.green(packname+' run dev:h5'))
103
103
  console.log(ck.green('在本窗口输入上述命令,按回车键编译。'))
104
104
  })
105
105
 
package/src/rhbx.js CHANGED
@@ -11,7 +11,7 @@ Spinner = CLI.Spinner;
11
11
  const delFile = require("./util").default.delFile
12
12
 
13
13
  var countdown = new Spinner('请等待... ', ['/','\\','/','\\']);
14
- exports.run = function(type, name,vr) {
14
+ exports.run = function(type, name,vr,packname="npm") {
15
15
  chalk.then(v=>{
16
16
  clear()
17
17
  const ck = new v.Chalk();
@@ -95,11 +95,11 @@ exports.run = function(type, name,vr) {
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))
102
- console.log(ck.green('npm install'))
102
+ console.log(ck.green(packname+' install'))
103
103
  return
104
104
  }
105
105
  clear();