@qingtian/qtcli 1.0.0 → 1.0.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/README.md +193 -193
- package/dist/package.json +8 -16
- package/dist/qt.conf.js +4 -3
- package/dist/src/commands/dev.js +4 -4
- package/dist/src/processEnv/loader.js +1 -0
- package/dist/src/utils/deepMerge.js +55 -0
- package/dist/src/utils/formatOutput.js +17 -21
- package/dist/src/utils/logger.js +4 -4
- package/dist/src/utils/teamData.js +171 -0
- package/dist/src/webpack/web/index.js +1 -1
- package/dist/src/webpack/web/webpack.base.js +4 -5
- package/dist/src/webpack/web/webpack.prod.js +12 -12
- package/package.json +8 -16
package/README.md
CHANGED
|
@@ -1,193 +1,193 @@
|
|
|
1
|
-
# QTCli
|
|
2
|
-
|
|
3
|
-
QTCli 是一款基于 Node.js 的前端工程化底座,提供了完整的项目构建、开发和部署解决方案。
|
|
4
|
-
|
|
5
|
-
## 特性
|
|
6
|
-
|
|
7
|
-
- 🚀 快速创建和初始化项目
|
|
8
|
-
- 📦 内置 Webpack 构建配置
|
|
9
|
-
- 🔥 支持 React + TypeScript 开发
|
|
10
|
-
- 🎨 支持 Less、Sass、CSS Modules
|
|
11
|
-
- 📱 支持移动端适配
|
|
12
|
-
- 🔍 内置 ESLint、StyleLint 代码规范检查
|
|
13
|
-
- 🛠 支持自定义配置和插件扩展
|
|
14
|
-
|
|
15
|
-
## 安装
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install -g qtcli
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## 使用方法
|
|
22
|
-
|
|
23
|
-
### 查看帮助
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
qtcli --help
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### 初始化项目
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
qtcli init [options]
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### 开发模式
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
qtcli dev [options]
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### 构建项目
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
qtcli build [options]
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### 全局选项
|
|
48
|
-
|
|
49
|
-
- `-V, --version`: 显示版本号
|
|
50
|
-
- `-D, --debug`: 启用调试模式
|
|
51
|
-
- `-h, --help`: 显示帮助信息
|
|
52
|
-
|
|
53
|
-
## 项目结构
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
my-project/
|
|
57
|
-
├── src/ # 源代码目录
|
|
58
|
-
├── public/ # 静态资源目录
|
|
59
|
-
├── dist/ # 构建输出目录
|
|
60
|
-
└── qt.conf.js # 项目配置文件
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## 配置说明
|
|
64
|
-
|
|
65
|
-
在项目根目录创建 `qt.conf.js` 文件进行自定义配置:
|
|
66
|
-
|
|
67
|
-
```javascript
|
|
68
|
-
export default {
|
|
69
|
-
// 构建类型
|
|
70
|
-
buildType: 'WEB',
|
|
71
|
-
|
|
72
|
-
// 解决方案名称
|
|
73
|
-
solutionName: 'my-project',
|
|
74
|
-
|
|
75
|
-
// 构建模式
|
|
76
|
-
buildMode: {
|
|
77
|
-
development: 'DEVELOPMENT',
|
|
78
|
-
production: 'PRODUCTION',
|
|
79
|
-
test: 'TEST',
|
|
80
|
-
analyze: 'ANALYZE'
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
// 项目配置
|
|
84
|
-
config: {
|
|
85
|
-
// HTML 注入配置
|
|
86
|
-
htmlInject: {
|
|
87
|
-
head: [
|
|
88
|
-
// meta 标签
|
|
89
|
-
{
|
|
90
|
-
tag: 'meta',
|
|
91
|
-
attrs: {
|
|
92
|
-
charset: 'utf-8'
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
tag: 'meta',
|
|
97
|
-
attrs: {
|
|
98
|
-
name: 'viewport',
|
|
99
|
-
content: 'width=device-width, initial-scale=1'
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
// link 标签
|
|
103
|
-
{
|
|
104
|
-
tag: 'link',
|
|
105
|
-
attrs: {
|
|
106
|
-
rel: 'stylesheet',
|
|
107
|
-
href: '/static/css/global.css'
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
],
|
|
111
|
-
body: [
|
|
112
|
-
// body 中的 script
|
|
113
|
-
{
|
|
114
|
-
tag: 'script',
|
|
115
|
-
attrs: {
|
|
116
|
-
src: '/static/js/init.js'
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
]
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
// JavaScript 代码片段注入配置
|
|
123
|
-
jsInject: {
|
|
124
|
-
head: [
|
|
125
|
-
{
|
|
126
|
-
code: `window.APP_CONFIG = {
|
|
127
|
-
version: '1.0.0',
|
|
128
|
-
env: '${process.env.NODE_ENV}',
|
|
129
|
-
apiUrl: '${process.env.API_URL}'
|
|
130
|
-
};`
|
|
131
|
-
}
|
|
132
|
-
],
|
|
133
|
-
body: [
|
|
134
|
-
{
|
|
135
|
-
code: `document.addEventListener('DOMContentLoaded', function() {
|
|
136
|
-
console.log('DOM loaded');
|
|
137
|
-
});`
|
|
138
|
-
}
|
|
139
|
-
]
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
// 环境变量配置
|
|
143
|
-
env: {
|
|
144
|
-
development: {
|
|
145
|
-
NODE_ENV: 'development',
|
|
146
|
-
API_URL: 'http://dev-api.example.com'
|
|
147
|
-
},
|
|
148
|
-
production: {
|
|
149
|
-
NODE_ENV: 'production',
|
|
150
|
-
API_URL: 'http://api.example.com'
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
// webpack 配置
|
|
156
|
-
webpackConfig: {
|
|
157
|
-
// 开发服务器配置
|
|
158
|
-
devServer: {
|
|
159
|
-
port: 3000,
|
|
160
|
-
host: 'localhost'
|
|
161
|
-
},
|
|
162
|
-
// 解析配置
|
|
163
|
-
resolve: {
|
|
164
|
-
alias: {
|
|
165
|
-
'@components': './src/components',
|
|
166
|
-
'@utils': './src/utils'
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
// 模块规则
|
|
170
|
-
module: {
|
|
171
|
-
rules: []
|
|
172
|
-
},
|
|
173
|
-
// 插件配置
|
|
174
|
-
plugins: []
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
## 开发环境要求
|
|
180
|
-
|
|
181
|
-
- Node.js >= 14.0.0
|
|
182
|
-
- npm >= 6.0.0
|
|
183
|
-
|
|
184
|
-
## 作者
|
|
185
|
-
|
|
186
|
-
- yujie.guo - 初始作者
|
|
187
|
-
|
|
188
|
-
## 问题反馈
|
|
189
|
-
|
|
190
|
-
如果你遇到任何问题或有任何建议,请通过以下方式联系我们:
|
|
191
|
-
|
|
192
|
-
- 提交 Issue: [GitHub Issues](https://gitee.com/fengrengame/qtnode/issues)
|
|
193
|
-
- 邮件联系: 296963166@qq.com
|
|
1
|
+
# QTCli
|
|
2
|
+
|
|
3
|
+
QTCli 是一款基于 Node.js 的前端工程化底座,提供了完整的项目构建、开发和部署解决方案。
|
|
4
|
+
|
|
5
|
+
## 特性
|
|
6
|
+
|
|
7
|
+
- 🚀 快速创建和初始化项目
|
|
8
|
+
- 📦 内置 Webpack 构建配置
|
|
9
|
+
- 🔥 支持 React + TypeScript 开发
|
|
10
|
+
- 🎨 支持 Less、Sass、CSS Modules
|
|
11
|
+
- 📱 支持移动端适配
|
|
12
|
+
- 🔍 内置 ESLint、StyleLint 代码规范检查
|
|
13
|
+
- 🛠 支持自定义配置和插件扩展
|
|
14
|
+
|
|
15
|
+
## 安装
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g qtcli
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 使用方法
|
|
22
|
+
|
|
23
|
+
### 查看帮助
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
qtcli --help
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 初始化项目
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
qtcli init [options]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 开发模式
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
qtcli dev [options]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 构建项目
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
qtcli build [options]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 全局选项
|
|
48
|
+
|
|
49
|
+
- `-V, --version`: 显示版本号
|
|
50
|
+
- `-D, --debug`: 启用调试模式
|
|
51
|
+
- `-h, --help`: 显示帮助信息
|
|
52
|
+
|
|
53
|
+
## 项目结构
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
my-project/
|
|
57
|
+
├── src/ # 源代码目录
|
|
58
|
+
├── public/ # 静态资源目录
|
|
59
|
+
├── dist/ # 构建输出目录
|
|
60
|
+
└── qt.conf.js # 项目配置文件
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## 配置说明
|
|
64
|
+
|
|
65
|
+
在项目根目录创建 `qt.conf.js` 文件进行自定义配置:
|
|
66
|
+
|
|
67
|
+
```javascript
|
|
68
|
+
export default {
|
|
69
|
+
// 构建类型
|
|
70
|
+
buildType: 'WEB',
|
|
71
|
+
|
|
72
|
+
// 解决方案名称
|
|
73
|
+
solutionName: 'my-project',
|
|
74
|
+
|
|
75
|
+
// 构建模式
|
|
76
|
+
buildMode: {
|
|
77
|
+
development: 'DEVELOPMENT',
|
|
78
|
+
production: 'PRODUCTION',
|
|
79
|
+
test: 'TEST',
|
|
80
|
+
analyze: 'ANALYZE'
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
// 项目配置
|
|
84
|
+
config: {
|
|
85
|
+
// HTML 注入配置
|
|
86
|
+
htmlInject: {
|
|
87
|
+
head: [
|
|
88
|
+
// meta 标签
|
|
89
|
+
{
|
|
90
|
+
tag: 'meta',
|
|
91
|
+
attrs: {
|
|
92
|
+
charset: 'utf-8'
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
tag: 'meta',
|
|
97
|
+
attrs: {
|
|
98
|
+
name: 'viewport',
|
|
99
|
+
content: 'width=device-width, initial-scale=1'
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
// link 标签
|
|
103
|
+
{
|
|
104
|
+
tag: 'link',
|
|
105
|
+
attrs: {
|
|
106
|
+
rel: 'stylesheet',
|
|
107
|
+
href: '/static/css/global.css'
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
body: [
|
|
112
|
+
// body 中的 script
|
|
113
|
+
{
|
|
114
|
+
tag: 'script',
|
|
115
|
+
attrs: {
|
|
116
|
+
src: '/static/js/init.js'
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
// JavaScript 代码片段注入配置
|
|
123
|
+
jsInject: {
|
|
124
|
+
head: [
|
|
125
|
+
{
|
|
126
|
+
code: `window.APP_CONFIG = {
|
|
127
|
+
version: '1.0.0',
|
|
128
|
+
env: '${process.env.NODE_ENV}',
|
|
129
|
+
apiUrl: '${process.env.API_URL}'
|
|
130
|
+
};`
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
body: [
|
|
134
|
+
{
|
|
135
|
+
code: `document.addEventListener('DOMContentLoaded', function() {
|
|
136
|
+
console.log('DOM loaded');
|
|
137
|
+
});`
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
// 环境变量配置
|
|
143
|
+
env: {
|
|
144
|
+
development: {
|
|
145
|
+
NODE_ENV: 'development',
|
|
146
|
+
API_URL: 'http://dev-api.example.com'
|
|
147
|
+
},
|
|
148
|
+
production: {
|
|
149
|
+
NODE_ENV: 'production',
|
|
150
|
+
API_URL: 'http://api.example.com'
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
// webpack 配置
|
|
156
|
+
webpackConfig: {
|
|
157
|
+
// 开发服务器配置
|
|
158
|
+
devServer: {
|
|
159
|
+
port: 3000,
|
|
160
|
+
host: 'localhost'
|
|
161
|
+
},
|
|
162
|
+
// 解析配置
|
|
163
|
+
resolve: {
|
|
164
|
+
alias: {
|
|
165
|
+
'@components': './src/components',
|
|
166
|
+
'@utils': './src/utils'
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
// 模块规则
|
|
170
|
+
module: {
|
|
171
|
+
rules: []
|
|
172
|
+
},
|
|
173
|
+
// 插件配置
|
|
174
|
+
plugins: []
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## 开发环境要求
|
|
180
|
+
|
|
181
|
+
- Node.js >= 14.0.0
|
|
182
|
+
- npm >= 6.0.0
|
|
183
|
+
|
|
184
|
+
## 作者
|
|
185
|
+
|
|
186
|
+
- yujie.guo - 初始作者
|
|
187
|
+
|
|
188
|
+
## 问题反馈
|
|
189
|
+
|
|
190
|
+
如果你遇到任何问题或有任何建议,请通过以下方式联系我们:
|
|
191
|
+
|
|
192
|
+
- 提交 Issue: [GitHub Issues](https://gitee.com/fengrengame/qtnode/issues)
|
|
193
|
+
- 邮件联系: 296963166@qq.com
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qingtian/qtcli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "QTCli是一款基于node的前端工程化底座",
|
|
5
5
|
"homepage": "https://gitee.com/fengrengame/qtnode#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"@babel/preset-env": "7.18.2",
|
|
73
73
|
"@babel/preset-react": "7.17.12",
|
|
74
74
|
"@babel/preset-typescript": "7.17.12",
|
|
75
|
+
"@commitlint/cli": "^19.8.0",
|
|
75
76
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
|
76
77
|
"@svgr/webpack": "^5.5.0",
|
|
77
78
|
"@types/react": "18.0.12",
|
|
78
79
|
"@types/react-dom": "18.0.5",
|
|
79
80
|
"autoprefixer": "10.4.7",
|
|
80
|
-
"babel-jest": "^27.4.2",
|
|
81
81
|
"babel-loader": "^8.2.3",
|
|
82
82
|
"babel-plugin-import": "1.13.8",
|
|
83
83
|
"babel-plugin-named-asset-import": "^0.3.8",
|
|
@@ -110,12 +110,10 @@
|
|
|
110
110
|
"fs-extra": "^10.0.0",
|
|
111
111
|
"glob-all": "3.3.1",
|
|
112
112
|
"html-webpack-plugin": "^5.5.0",
|
|
113
|
+
"html-webpack-tags-plugin": "^3.0.0",
|
|
113
114
|
"husky": "8.0.3",
|
|
114
115
|
"identity-obj-proxy": "^3.0.0",
|
|
115
116
|
"inquirer": "8.0.0",
|
|
116
|
-
"jest": "^27.4.3",
|
|
117
|
-
"jest-resolve": "^27.4.2",
|
|
118
|
-
"jest-watch-typeahead": "^1.0.0",
|
|
119
117
|
"less": "4.1.3",
|
|
120
118
|
"less-loader": "11.0.0",
|
|
121
119
|
"lint-staged": "15.5.1",
|
|
@@ -162,10 +160,10 @@
|
|
|
162
160
|
"webpack-manifest-plugin": "^4.0.2",
|
|
163
161
|
"webpack-merge": "5.8.0",
|
|
164
162
|
"workbox-webpack-plugin": "^6.4.1",
|
|
163
|
+
"xlsx": "^0.18.5",
|
|
165
164
|
"yamljs": "0.3.0"
|
|
166
165
|
},
|
|
167
166
|
"devDependencies": {
|
|
168
|
-
"@commitlint/cli": "^19.8.0",
|
|
169
167
|
"@types/autoprefixer": "10.2.0",
|
|
170
168
|
"@types/cli-progress": "3.11.5",
|
|
171
169
|
"@types/colors": "1.2.1",
|
|
@@ -194,16 +192,10 @@
|
|
|
194
192
|
"@types/webpack-dev-server": "4.7.2",
|
|
195
193
|
"@types/webpack-merge": "5.0.0",
|
|
196
194
|
"@types/yamljs": "0.2.34",
|
|
197
|
-
"
|
|
198
|
-
"
|
|
199
|
-
"
|
|
200
|
-
"
|
|
201
|
-
"eslint-plugin-prettier": "^5.3.1",
|
|
202
|
-
"html-webpack-tags-plugin": "^3.0.0",
|
|
203
|
-
"husky": "^8.0.3",
|
|
204
|
-
"lint-staged": "^15.5.1",
|
|
205
|
-
"prettier": "^3.5.3",
|
|
206
|
-
"prettier-config-ali": "^1.3.4"
|
|
195
|
+
"babel-jest": "^27.4.2",
|
|
196
|
+
"jest": "^27.4.3",
|
|
197
|
+
"jest-resolve": "^27.4.2",
|
|
198
|
+
"jest-watch-typeahead": "^1.0.0"
|
|
207
199
|
},
|
|
208
200
|
"email": "296963166@qq.com"
|
|
209
201
|
}
|
package/dist/qt.conf.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = {
|
|
2
|
+
module.exports = {
|
|
4
3
|
buildType: 'WEB',
|
|
5
4
|
solutionName: 'qtnode',
|
|
6
5
|
buildMode: {
|
|
@@ -86,7 +85,9 @@ exports.default = {
|
|
|
86
85
|
},
|
|
87
86
|
// webpack 配置
|
|
88
87
|
webpackConfig: {
|
|
89
|
-
devServer: {
|
|
88
|
+
devServer: {
|
|
89
|
+
port: 3001,
|
|
90
|
+
},
|
|
90
91
|
resolve: {
|
|
91
92
|
alias: {
|
|
92
93
|
'@components': './src/components',
|
package/dist/src/commands/dev.js
CHANGED
|
@@ -48,10 +48,10 @@ exports.default = (function () {
|
|
|
48
48
|
var heat = new commander_1.default.Command('dev');
|
|
49
49
|
heat
|
|
50
50
|
.description('开启本地调试服务器')
|
|
51
|
-
.option('--https [
|
|
52
|
-
.option('-p, --port <port>', '绑定端口'
|
|
53
|
-
.option('-d, --domain <host>', '绑定域名'
|
|
54
|
-
.option('-o, --open <open>', '自动打开浏览器'
|
|
51
|
+
.option('--https [https]', '启用https')
|
|
52
|
+
.option('-p, --port <port>', '绑定端口')
|
|
53
|
+
.option('-d, --domain <host>', '绑定域名')
|
|
54
|
+
.option('-o, --open <open>', '自动打开浏览器')
|
|
55
55
|
.action(function (options, cmd) { return __awaiter(void 0, void 0, void 0, function () {
|
|
56
56
|
var cm;
|
|
57
57
|
return __generator(this, function (_a) {
|
|
@@ -43,6 +43,7 @@ var ProcessEnvLoader = /** @class */ (function () {
|
|
|
43
43
|
try {
|
|
44
44
|
// 加载 qtcli.config.js
|
|
45
45
|
var qtConfigPath = path_1.default.join(rootDir, 'qt.conf.js');
|
|
46
|
+
console.log('qtconfigpat', qtConfigPath, rootDir);
|
|
46
47
|
if (fs_1.default.existsSync(qtConfigPath)) {
|
|
47
48
|
this.qtConfig = require(qtConfigPath);
|
|
48
49
|
// 将 qtConfig 中的环境变量添加到 process.env
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
+
if (ar || !(i in from)) {
|
|
16
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
+
ar[i] = from[i];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.deepMerge = void 0;
|
|
24
|
+
/**
|
|
25
|
+
* 深度合并对象
|
|
26
|
+
* @param target 目标对象
|
|
27
|
+
* @param source 源对象
|
|
28
|
+
* @returns 合并后的对象
|
|
29
|
+
*/
|
|
30
|
+
function deepMerge(target, source) {
|
|
31
|
+
var result = __assign({}, target);
|
|
32
|
+
for (var key in source) {
|
|
33
|
+
var sourceValue = source[key];
|
|
34
|
+
var targetValue = target[key];
|
|
35
|
+
if (sourceValue !== null &&
|
|
36
|
+
typeof sourceValue === 'object' &&
|
|
37
|
+
targetValue !== null &&
|
|
38
|
+
typeof targetValue === 'object') {
|
|
39
|
+
// 如果是数组,直接合并
|
|
40
|
+
if (Array.isArray(sourceValue)) {
|
|
41
|
+
result[key] = __spreadArray(__spreadArray([], targetValue, true), sourceValue, true);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
// 递归合并对象
|
|
45
|
+
result[key] = deepMerge(targetValue, sourceValue);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else if (sourceValue !== undefined) {
|
|
49
|
+
// 如果源对象的值不是 undefined,则使用源对象的值
|
|
50
|
+
result[key] = sourceValue;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
exports.deepMerge = deepMerge;
|
|
@@ -114,11 +114,18 @@ var formatESLintMessages = function (results, severity) {
|
|
|
114
114
|
var severityText = m.severity === 2 ? colors_1.default.red('error') : colors_1.default.yellow('warning');
|
|
115
115
|
var location = colors_1.default.gray.underline("".concat(m.line, ":").concat(m.column));
|
|
116
116
|
var ruleId = m.ruleId ? colors_1.default.cyan(" ".concat(m.ruleId)) : '';
|
|
117
|
-
return "".concat(severityText, "
|
|
117
|
+
return " ".concat(severityText, " ").concat(colors_1.default.gray(m.message)).concat(ruleId, " ").concat(location);
|
|
118
118
|
});
|
|
119
|
-
return messages.join('\n');
|
|
119
|
+
return "".concat(colors_1.default.white(r.filePath), "\n").concat(messages.join('\n'));
|
|
120
120
|
})
|
|
121
|
-
.join('\n');
|
|
121
|
+
.join('\n\n');
|
|
122
|
+
};
|
|
123
|
+
var getStatus = function (errorCount, warningCount) {
|
|
124
|
+
if (errorCount > 0)
|
|
125
|
+
return 'error';
|
|
126
|
+
if (warningCount > 0)
|
|
127
|
+
return 'warning';
|
|
128
|
+
return 'success';
|
|
122
129
|
};
|
|
123
130
|
exports.formatOutput = {
|
|
124
131
|
build: function (output) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -127,7 +134,9 @@ exports.formatOutput = {
|
|
|
127
134
|
return __generator(this, function (_c) {
|
|
128
135
|
nodes = [];
|
|
129
136
|
errorMessages = output.errors > 0
|
|
130
|
-
? ((_a = output.buildErrors) === null || _a === void 0 ? void 0 : _a.map(function (error) {
|
|
137
|
+
? ((_a = output.buildErrors) === null || _a === void 0 ? void 0 : _a.map(function (error) {
|
|
138
|
+
return "".concat(colors_1.default.red('ERROR'), " in ").concat(colors_1.default.white("".concat(error.moduleName, "\n").concat(error.message)), "\n").concat(error === null || error === void 0 ? void 0 : error.stack);
|
|
139
|
+
}).join('\n')) || "".concat(colors_1.default.red(String(output.errors)), " \u4E2A\u9519\u8BEF")
|
|
131
140
|
: '无错误';
|
|
132
141
|
nodes.push((0, exports.formatNode)({
|
|
133
142
|
type: 'process',
|
|
@@ -175,23 +184,17 @@ exports.formatOutput = {
|
|
|
175
184
|
});
|
|
176
185
|
}); },
|
|
177
186
|
eslint: function (output) { return __awaiter(void 0, void 0, void 0, function () {
|
|
178
|
-
var nodes, errorMessages, warningMessages, errorText, warningText, timeText
|
|
187
|
+
var nodes, errorMessages, warningMessages, errorText, warningText, timeText;
|
|
179
188
|
return __generator(this, function (_a) {
|
|
180
189
|
nodes = [];
|
|
181
|
-
errorMessages = output.errorCount > 0
|
|
182
|
-
? formatESLintMessages(output.results, 2) ||
|
|
183
|
-
"".concat(colors_1.default.red(String(output.errorCount)), " \u4E2A\u9519\u8BEF")
|
|
184
|
-
: '无错误';
|
|
190
|
+
errorMessages = output.errorCount > 0 ? formatESLintMessages(output.results, 2) : '无错误';
|
|
185
191
|
nodes.push((0, exports.formatNode)({
|
|
186
192
|
type: 'process',
|
|
187
193
|
title: 'ESLint错误',
|
|
188
194
|
content: errorMessages,
|
|
189
195
|
status: output.errorCount > 0 ? 'error' : 'success',
|
|
190
196
|
}));
|
|
191
|
-
warningMessages = output.warningCount > 0
|
|
192
|
-
? formatESLintMessages(output.results, 1) ||
|
|
193
|
-
"".concat(colors_1.default.yellow(String(output.warningCount)), " \u4E2A\u8B66\u544A")
|
|
194
|
-
: '无警告';
|
|
197
|
+
warningMessages = output.warningCount > 0 ? formatESLintMessages(output.results, 1) : '无警告';
|
|
195
198
|
nodes.push((0, exports.formatNode)({
|
|
196
199
|
type: 'process',
|
|
197
200
|
title: 'ESLint警告',
|
|
@@ -201,18 +204,11 @@ exports.formatOutput = {
|
|
|
201
204
|
errorText = colors_1.default.red("".concat(output.errorCount, " \u9519\u8BEF"));
|
|
202
205
|
warningText = colors_1.default.yellow("".concat(output.warningCount, " \u8B66\u544A"));
|
|
203
206
|
timeText = output.time ? colors_1.default.green("\u8017\u65F6 ".concat((output.time / 1000).toFixed(2), "s")) : '';
|
|
204
|
-
status = 'success';
|
|
205
|
-
if (output.errorCount > 0) {
|
|
206
|
-
status = 'error';
|
|
207
|
-
}
|
|
208
|
-
else if (output.warningCount > 0) {
|
|
209
|
-
status = 'warning';
|
|
210
|
-
}
|
|
211
207
|
nodes.push((0, exports.formatNode)({
|
|
212
208
|
type: 'process',
|
|
213
209
|
title: 'ESLint检查完成',
|
|
214
210
|
content: "".concat(errorText, " ").concat(warningText, " ").concat(timeText),
|
|
215
|
-
status:
|
|
211
|
+
status: getStatus(output.errorCount, output.warningCount),
|
|
216
212
|
}));
|
|
217
213
|
return [2 /*return*/, nodes.join('\n')];
|
|
218
214
|
});
|
package/dist/src/utils/logger.js
CHANGED
|
@@ -29,12 +29,12 @@ var formatOutput_1 = require("../utils/formatOutput");
|
|
|
29
29
|
var logStart = function () {
|
|
30
30
|
console.log((0, formatOutput_1.formatNode)({
|
|
31
31
|
type: 'start',
|
|
32
|
-
title:
|
|
32
|
+
title: "QTCli \u5DE5\u7A0B\u5E95\u5EA7 ".concat(pkg.version),
|
|
33
33
|
}));
|
|
34
34
|
console.log((0, formatOutput_1.formatNode)({
|
|
35
|
-
type: '
|
|
36
|
-
title: '
|
|
37
|
-
content:
|
|
35
|
+
type: 'process',
|
|
36
|
+
title: '环境信息',
|
|
37
|
+
content: "\u5F53\u524D\u73AF\u5883: ".concat(process.env.NODE_ENV || 'development', "\nNode\u7248\u672C: ").concat(process.version),
|
|
38
38
|
}));
|
|
39
39
|
};
|
|
40
40
|
exports.logStart = logStart;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var teamData = [
|
|
4
|
+
{
|
|
5
|
+
projectName: 'AC项目',
|
|
6
|
+
teams: [
|
|
7
|
+
{
|
|
8
|
+
teamName: '古墓丽影战队',
|
|
9
|
+
members: [
|
|
10
|
+
{ name: '刘茜苑', type: '战队队员' },
|
|
11
|
+
{ name: '黄孝文', type: '战队队员' },
|
|
12
|
+
{ name: '张大千', type: '战队队员' },
|
|
13
|
+
{ name: '李智', type: '战队队长' },
|
|
14
|
+
{ name: '辛义海', type: '战队队员' },
|
|
15
|
+
{ name: '郑全超', type: '战队队员' },
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
teamName: '多维巡航者',
|
|
20
|
+
members: [
|
|
21
|
+
{ name: '苗凯', type: '战队队员' },
|
|
22
|
+
{ name: '王祥祥', type: '战队队员' },
|
|
23
|
+
{ name: '宋文婷', type: '战队队员' },
|
|
24
|
+
{ name: '刘帅鑫', type: '战队队员' },
|
|
25
|
+
{ name: '任晓青', type: '战队队员' },
|
|
26
|
+
{ name: '孔令贵', type: '战队队员' },
|
|
27
|
+
{ name: '赖楠楠', type: '战队队员' },
|
|
28
|
+
{ name: '赵文龙', type: '战队队员' },
|
|
29
|
+
{ name: '李冠华', type: '战队队员' },
|
|
30
|
+
{ name: '范亨举', type: '战队队长' },
|
|
31
|
+
{ name: '吴如军', type: '战队队员' },
|
|
32
|
+
{ name: '王海阔', type: '战队队员' },
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
teamName: '方块空间战队',
|
|
37
|
+
members: [
|
|
38
|
+
{ name: '刘钰雪', type: '战队队长' },
|
|
39
|
+
{ name: '谭鑫鑫', type: '战队队员' },
|
|
40
|
+
{ name: '侯明江', type: '战队队员' },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
teamName: '三消数据战队',
|
|
45
|
+
members: [
|
|
46
|
+
{ name: '王杰', type: '战队队员' },
|
|
47
|
+
{ name: '李朋飞', type: '战队队员' },
|
|
48
|
+
{ name: '吴永辉', type: '战队队员' },
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
teamName: '神威战队',
|
|
53
|
+
members: [
|
|
54
|
+
{ name: '张远波', type: '战队队员' },
|
|
55
|
+
{ name: '衣光辉', type: '战队队长' },
|
|
56
|
+
{ name: '刘军', type: '战队队员' },
|
|
57
|
+
{ name: '房佳龙', type: '战队队员' },
|
|
58
|
+
{ name: '王浩', type: '战队队员' },
|
|
59
|
+
{ name: '缪呈祥', type: '战队队员' },
|
|
60
|
+
{ name: '黄思灵', type: '战队队长' },
|
|
61
|
+
{ name: '郭宇杰', type: 'CEO' },
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
teamName: '数据猎鹰战队',
|
|
66
|
+
members: [{ name: '刘翀', type: '战队队员' }],
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
members: [
|
|
70
|
+
{ name: '袁旭道', type: 'Buddy' },
|
|
71
|
+
{ name: '李强强', type: '军团指挥官' },
|
|
72
|
+
{ name: '石军强', type: '军团指挥官' },
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
projectName: 'EM项目',
|
|
77
|
+
teams: [
|
|
78
|
+
{
|
|
79
|
+
teamName: '财富开拓者战队',
|
|
80
|
+
members: [
|
|
81
|
+
{ name: '邓照', type: '战队队员' },
|
|
82
|
+
{ name: '马金涛', type: '战队队员' },
|
|
83
|
+
{ name: '陈守肖', type: '战队队员' },
|
|
84
|
+
{ name: '崔福权', type: '战队队员' },
|
|
85
|
+
{ name: '孙若尘', type: '战队长' },
|
|
86
|
+
{ name: '李阳阳', type: '战队队员' },
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
teamName: '共鸣之声战队',
|
|
91
|
+
members: [
|
|
92
|
+
{ name: '黄海', type: '战队队员' },
|
|
93
|
+
{ name: '周浩', type: '战队队员' },
|
|
94
|
+
{ name: '王琛', type: '战队队员' },
|
|
95
|
+
{ name: '强敏', type: '战队队员' },
|
|
96
|
+
{ name: '陈璇', type: '战队队长' },
|
|
97
|
+
{ name: '钟勇飞', type: '战队队员' },
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
teamName: '烈焰之笔战队',
|
|
102
|
+
members: [
|
|
103
|
+
{ name: '刘腾飞', type: '战队队员' },
|
|
104
|
+
{ name: '颜丙峰', type: '战队队员' },
|
|
105
|
+
{ name: '张超', type: '战队队员' },
|
|
106
|
+
{ name: '姜兆珍', type: '战队队员' },
|
|
107
|
+
{ name: '兰喆', type: '战队队员' },
|
|
108
|
+
{ name: '莫玉涛', type: '战队队员' },
|
|
109
|
+
{ name: '王伟', type: '战队队长' },
|
|
110
|
+
{ name: '唐杰', type: '战队队员' },
|
|
111
|
+
{ name: '麻俊鹏', type: '战队队员' },
|
|
112
|
+
{ name: '刘卜蔚', type: '战队队员' },
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
teamName: '精算战鹰战队',
|
|
117
|
+
members: [
|
|
118
|
+
{ name: '郭维祎', type: '战队队员' },
|
|
119
|
+
{ name: '温绍琨', type: '战队队长' },
|
|
120
|
+
{ name: '马天', type: '战队队员' },
|
|
121
|
+
{ name: '孙峥嵘', type: '战队队员' },
|
|
122
|
+
{ name: '郝翌', type: '战队队员' },
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
teamName: '成长守护者战队',
|
|
127
|
+
members: [
|
|
128
|
+
{ name: '单宝龙', type: '战队队员' },
|
|
129
|
+
{ name: '邵鹏', type: '战队队员' },
|
|
130
|
+
{ name: '竺文杰', type: '战队队长' },
|
|
131
|
+
{ name: '丁浩', type: '战队队员' },
|
|
132
|
+
{ name: '杨在茂', type: '战队队员' },
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
teamName: '节日猎手战队',
|
|
137
|
+
members: [
|
|
138
|
+
{ name: '李子昂', type: '战队队员' },
|
|
139
|
+
{ name: '卢中原', type: '战队队员' },
|
|
140
|
+
{ name: '王圆凯', type: '战队队员' },
|
|
141
|
+
{ name: '赵文煊', type: '战队队长' },
|
|
142
|
+
{ name: '王鹏', type: '战队队员' },
|
|
143
|
+
{ name: '姚彦铭', type: '战队队员' },
|
|
144
|
+
{ name: '丁逸俊', type: '战队队员' },
|
|
145
|
+
{ name: '严学致', type: '战队队员' },
|
|
146
|
+
],
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
teamName: '竞技之刃战队',
|
|
150
|
+
members: [
|
|
151
|
+
{ name: '王顺祥', type: '战队队员' },
|
|
152
|
+
{ name: '冯钦伟', type: '战队队员' },
|
|
153
|
+
{ name: '崔永祺', type: '战队队员' },
|
|
154
|
+
{ name: '李文超', type: '战队队长' },
|
|
155
|
+
{ name: '解志辉', type: '战队队员' },
|
|
156
|
+
{ name: '张胜杰', type: '战队队员' },
|
|
157
|
+
],
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
teamName: '模块构造者战队',
|
|
161
|
+
members: [{ name: '石军强', type: '军团指挥官' }],
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
teamName: '创世者战队',
|
|
165
|
+
members: [{ name: '吴桥', type: '战队员' }],
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
members: [{ name: '石军强', type: '军团指挥官' }],
|
|
169
|
+
},
|
|
170
|
+
];
|
|
171
|
+
exports.default = teamData;
|
|
@@ -58,7 +58,7 @@ function dev() {
|
|
|
58
58
|
Object.assign(devServerOptions, {
|
|
59
59
|
open: (_c = (_b = argCmd === null || argCmd === void 0 ? void 0 : argCmd.open) !== null && _b !== void 0 ? _b : devServerOptions.open) !== null && _c !== void 0 ? _c : false,
|
|
60
60
|
port: (argCmd === null || argCmd === void 0 ? void 0 : argCmd.port) || process.env.PORT || devServerOptions.port || 'auto',
|
|
61
|
-
server: (argCmd === null || argCmd === void 0 ? void 0 : argCmd.
|
|
61
|
+
server: (argCmd === null || argCmd === void 0 ? void 0 : argCmd.https) ? 'https' : devServerOptions.server || 'http',
|
|
62
62
|
host: (argCmd === null || argCmd === void 0 ? void 0 : argCmd.domain) || devServerOptions.host || 'localhost',
|
|
63
63
|
});
|
|
64
64
|
// 合并代理配置
|
|
@@ -22,10 +22,11 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
22
22
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
23
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
24
|
};
|
|
25
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p
|
|
25
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
var loader_1 = require("../../processEnv/loader");
|
|
28
28
|
var manager_1 = require("../../processEnv/manager");
|
|
29
|
+
var deepMerge_1 = require("../../utils/deepMerge");
|
|
29
30
|
var DonePlugin_1 = __importDefault(require("../plugins/DonePlugin"));
|
|
30
31
|
var FileListPlugin_1 = __importDefault(require("../plugins/FileListPlugin"));
|
|
31
32
|
var InjectScriptPlugin_1 = __importDefault(require("../plugins/InjectScriptPlugin"));
|
|
@@ -405,7 +406,7 @@ var config = {
|
|
|
405
406
|
], false).filter(Boolean),
|
|
406
407
|
resolve: {
|
|
407
408
|
modules: ['node_modules', path.resolve(__dirname, '../../../node_modules')],
|
|
408
|
-
extensions: ['.
|
|
409
|
+
extensions: ['.tsx', '.ts', '.jsx', '.js', '.less', '.scss'],
|
|
409
410
|
alias: __assign({ '@': path.resolve(process.cwd(), './src'), react: path.resolve(process.cwd(), './node_modules/react') }, (_p = (_o = qtConfig === null || qtConfig === void 0 ? void 0 : qtConfig.webpackConfig) === null || _o === void 0 ? void 0 : _o.resolve) === null || _p === void 0 ? void 0 : _p.alias),
|
|
410
411
|
},
|
|
411
412
|
resolveLoader: {
|
|
@@ -413,7 +414,5 @@ var config = {
|
|
|
413
414
|
},
|
|
414
415
|
};
|
|
415
416
|
// 合并 webpack 配置
|
|
416
|
-
var finalConfig =
|
|
417
|
-
// 确保某些配置不被覆盖
|
|
418
|
-
entry: config.entry, output: __assign(__assign({}, config.output), (((_q = qtConfig.webpackConfig) === null || _q === void 0 ? void 0 : _q.output) || {})), module: __assign(__assign({}, config.module), { rules: __spreadArray(__spreadArray([], (((_r = config.module) === null || _r === void 0 ? void 0 : _r.rules) || []), true), (((_t = (_s = qtConfig.webpackConfig) === null || _s === void 0 ? void 0 : _s.module) === null || _t === void 0 ? void 0 : _t.rules) || []), true) }), plugins: __spreadArray(__spreadArray([], (config.plugins || []), true), (((_u = qtConfig.webpackConfig) === null || _u === void 0 ? void 0 : _u.plugins) || []), true) });
|
|
417
|
+
var finalConfig = (0, deepMerge_1.deepMerge)(config, qtConfig.webpackConfig || {});
|
|
419
418
|
exports.default = finalConfig;
|
|
@@ -5,14 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
var mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
|
|
7
7
|
var path = require('path');
|
|
8
|
-
|
|
8
|
+
// const globAll = require('glob-all');
|
|
9
9
|
var CompressionPlugin = require('compression-webpack-plugin');
|
|
10
10
|
var merge = require('webpack-merge').merge;
|
|
11
11
|
var baseConfig = require('./webpack.base').default;
|
|
12
12
|
var CopyPlugin = require('copy-webpack-plugin');
|
|
13
13
|
var CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
|
14
14
|
var TerserPlugin = require('terser-webpack-plugin');
|
|
15
|
-
|
|
15
|
+
// const PurgeCSSPlugin = require('purgecss-webpack-plugin');
|
|
16
16
|
exports.default = merge(baseConfig, {
|
|
17
17
|
mode: 'production',
|
|
18
18
|
plugins: [
|
|
@@ -30,16 +30,16 @@ exports.default = merge(baseConfig, {
|
|
|
30
30
|
new mini_css_extract_plugin_1.default({
|
|
31
31
|
filename: 'static/css/[name].[contenthash].css',
|
|
32
32
|
}),
|
|
33
|
-
new PurgeCSSPlugin({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}),
|
|
33
|
+
// new PurgeCSSPlugin({
|
|
34
|
+
// paths: globAll.sync([
|
|
35
|
+
// `${path.join(process.cwd(), './src')}/**/*.tsx`,
|
|
36
|
+
// `${path.join(process.cwd(), './src')}/**/*.jsx`,
|
|
37
|
+
// path.join(process.cwd(), './public/index.html'),
|
|
38
|
+
// ]),
|
|
39
|
+
// safelist: {
|
|
40
|
+
// standard: [/^ant-/],
|
|
41
|
+
// },
|
|
42
|
+
// }),
|
|
43
43
|
new CompressionPlugin({
|
|
44
44
|
test: /.(js|css)$/,
|
|
45
45
|
filename: '[path][base].gz',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qingtian/qtcli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "QTCli是一款基于node的前端工程化底座",
|
|
5
5
|
"homepage": "https://gitee.com/fengrengame/qtnode#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"@babel/preset-env": "7.18.2",
|
|
73
73
|
"@babel/preset-react": "7.17.12",
|
|
74
74
|
"@babel/preset-typescript": "7.17.12",
|
|
75
|
+
"@commitlint/cli": "^19.8.0",
|
|
75
76
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
|
76
77
|
"@svgr/webpack": "^5.5.0",
|
|
77
78
|
"@types/react": "18.0.12",
|
|
78
79
|
"@types/react-dom": "18.0.5",
|
|
79
80
|
"autoprefixer": "10.4.7",
|
|
80
|
-
"babel-jest": "^27.4.2",
|
|
81
81
|
"babel-loader": "^8.2.3",
|
|
82
82
|
"babel-plugin-import": "1.13.8",
|
|
83
83
|
"babel-plugin-named-asset-import": "^0.3.8",
|
|
@@ -110,12 +110,10 @@
|
|
|
110
110
|
"fs-extra": "^10.0.0",
|
|
111
111
|
"glob-all": "3.3.1",
|
|
112
112
|
"html-webpack-plugin": "^5.5.0",
|
|
113
|
+
"html-webpack-tags-plugin": "^3.0.0",
|
|
113
114
|
"husky": "8.0.3",
|
|
114
115
|
"identity-obj-proxy": "^3.0.0",
|
|
115
116
|
"inquirer": "8.0.0",
|
|
116
|
-
"jest": "^27.4.3",
|
|
117
|
-
"jest-resolve": "^27.4.2",
|
|
118
|
-
"jest-watch-typeahead": "^1.0.0",
|
|
119
117
|
"less": "4.1.3",
|
|
120
118
|
"less-loader": "11.0.0",
|
|
121
119
|
"lint-staged": "15.5.1",
|
|
@@ -162,10 +160,10 @@
|
|
|
162
160
|
"webpack-manifest-plugin": "^4.0.2",
|
|
163
161
|
"webpack-merge": "5.8.0",
|
|
164
162
|
"workbox-webpack-plugin": "^6.4.1",
|
|
163
|
+
"xlsx": "^0.18.5",
|
|
165
164
|
"yamljs": "0.3.0"
|
|
166
165
|
},
|
|
167
166
|
"devDependencies": {
|
|
168
|
-
"@commitlint/cli": "^19.8.0",
|
|
169
167
|
"@types/autoprefixer": "10.2.0",
|
|
170
168
|
"@types/cli-progress": "3.11.5",
|
|
171
169
|
"@types/colors": "1.2.1",
|
|
@@ -194,16 +192,10 @@
|
|
|
194
192
|
"@types/webpack-dev-server": "4.7.2",
|
|
195
193
|
"@types/webpack-merge": "5.0.0",
|
|
196
194
|
"@types/yamljs": "0.2.34",
|
|
197
|
-
"
|
|
198
|
-
"
|
|
199
|
-
"
|
|
200
|
-
"
|
|
201
|
-
"eslint-plugin-prettier": "^5.3.1",
|
|
202
|
-
"html-webpack-tags-plugin": "^3.0.0",
|
|
203
|
-
"husky": "^8.0.3",
|
|
204
|
-
"lint-staged": "^15.5.1",
|
|
205
|
-
"prettier": "^3.5.3",
|
|
206
|
-
"prettier-config-ali": "^1.3.4"
|
|
195
|
+
"babel-jest": "^27.4.2",
|
|
196
|
+
"jest": "^27.4.3",
|
|
197
|
+
"jest-resolve": "^27.4.2",
|
|
198
|
+
"jest-watch-typeahead": "^1.0.0"
|
|
207
199
|
},
|
|
208
200
|
"email": "296963166@qq.com"
|
|
209
201
|
}
|