kn-cli 1.0.41 → 1.0.42

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.
@@ -5,6 +5,7 @@ module.exports = {
5
5
  less:{
6
6
  javascriptEnabled:false,//是否开启less js
7
7
  },
8
+ version:'1.0',
8
9
  // https:true,//是否使用https本地调试
9
10
  // pxtorem:false,//默认:true,开启px转rem模式
10
11
  // site_root_path:'/dist/',// 默认:'',站点根目录
@@ -40,6 +40,7 @@ const css_modules= CLI_CONFIG?.cssModule??'local';
40
40
  const jsSplitMode = CLI_CONFIG?.jsSplitMode??true;
41
41
  const indexHtml = CLI_CONFIG?.indexHtml ?? true;
42
42
  const https= CLI_CONFIG?.https ?? false;
43
+ const appVersion= CLI_CONFIG?.version ?? '';
43
44
 
44
45
  let distFolder = 'dist';
45
46
  let distJsFolder='';
@@ -369,6 +370,7 @@ const plugins= [
369
370
  MOCK: process.env.mock == 1 ? '1' : false, //JSON.stringify(process.env.mock)
370
371
  ...API_HOST,
371
372
  PM_TYPE: JSON.stringify(process.env.pm_type),
373
+ APP_VERSION:JSON.stringify(appVersion)
372
374
  }),
373
375
  new webpack.SourceMapDevToolPlugin({
374
376
  filename: 'sourcemap/[file].map',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kn-cli",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/readme.md CHANGED
@@ -66,6 +66,9 @@ module.exports = {
66
66
  ```
67
67
 
68
68
  # 更新日志
69
+ * 1.0.42
70
+ cli.config.js增加version字段,用来标识应用版本号
71
+
69
72
  * 1.0.41
70
73
  cli.config.js内增加https的调试模式
71
74
 
@@ -5,6 +5,7 @@ module.exports = {
5
5
  less:{
6
6
  javascriptEnabled:false,//是否开启less js
7
7
  },
8
+ version:'1.0',
8
9
  // 自定义多入口
9
10
  // entry:{
10
11
  // 'home/index': 'src/jsx/home/index.jsx',