kn-cli 1.0.57 → 1.0.59

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.
Files changed (32) hide show
  1. package/build/cli.config.js +5 -0
  2. package/build/webpack.config.js +4 -3
  3. package/package.json +1 -1
  4. package/readme.md +8 -0
  5. package/src/build.js +1 -0
  6. package/templates/template_admin/frontend_build.sh +1 -1
  7. package/templates/template_oa/.gitignore +6 -0
  8. package/templates/template_oa/frontend_build.sh +1 -1
  9. package/templates/template_offcial/frontend_build.sh +1 -1
  10. package/templates/template_oa/.DS_Store +0 -0
  11. package/templates/template_oa/package-lock.json +0 -1925
  12. package/templates/template_oa/public/.DS_Store +0 -0
  13. package/templates/template_oa/public/pluginjs/.DS_Store +0 -0
  14. package/templates/template_oa/public/src/.DS_Store +0 -0
  15. package/templates/template_oa/public/src/assets/.DS_Store +0 -0
  16. package/templates/template_oa/public/src/assets/iconfont/.DS_Store +0 -0
  17. package/templates/template_oa/public/src/assets/images/.DS_Store +0 -0
  18. package/templates/template_oa/public/src/components/.DS_Store +0 -0
  19. package/templates/template_oa/public/src/components/Layout/.DS_Store +0 -0
  20. package/templates/template_oa/public/src/components/Page/.DS_Store +0 -0
  21. package/templates/template_oa/public/src/hooks/.DS_Store +0 -0
  22. package/templates/template_oa/public/src/pages/.DS_Store +0 -0
  23. package/templates/template_oa/public/src/services/.DS_Store +0 -0
  24. package/templates/template_oa/public/src/utils/.DS_Store +0 -0
  25. package/templates/template_oa/public/static/.DS_Store +0 -0
  26. package/templates/template_oa/release/.DS_Store +0 -0
  27. package/templates/template_oa/tools/.DS_Store +0 -0
  28. package/templates/template_oa/tools/iconfont/.DS_Store +0 -0
  29. package/templates/template_oa/tools/iconfont/dist/.DS_Store +0 -0
  30. package/templates/template_oa/tools/iconfont/svg/.DS_Store +0 -0
  31. package/templates/template_oa/tools/tinypng/.DS_Store +0 -0
  32. package/templates/template_oa/tools/tinypng/img/.DS_Store +0 -0
@@ -38,4 +38,9 @@ module.exports = {
38
38
  // output:'../index.html',//将index.html输出到 dist目录外的index.html
39
39
  // },
40
40
  // projectSourceFolder:'./',//项目源代码文件夹所在位置,默认是'src'
41
+ // devServer:{
42
+ // host:'0.0.0.0',//指定调试地址IP
43
+ // port:8080,
44
+ // useLocalIp:false,//是否使用本地IP地址代替localhost
45
+ // }
41
46
  };
@@ -41,6 +41,7 @@ const jsSplitMode = CLI_CONFIG?.jsSplitMode??true;
41
41
  const indexHtml = CLI_CONFIG?.indexHtml ?? true;
42
42
  const https= CLI_CONFIG?.https ?? false;
43
43
  const appVersion= CLI_CONFIG?.version ?? '';
44
+ const devServer=CLI_CONFIG?.devServer??{};
44
45
 
45
46
  let distFolder = 'dist';
46
47
  let distJsFolder='';
@@ -460,7 +461,7 @@ module.exports = {
460
461
  devServer: {
461
462
  disableHostCheck: true,
462
463
  contentBase: distFolder,
463
- host: '0.0.0.0',
464
+ host: devServer?.host??'localhost',
464
465
  open: true,
465
466
  overlay:true,
466
467
  stats:{
@@ -470,8 +471,8 @@ module.exports = {
470
471
  errorDetails:true,
471
472
  warnings:true
472
473
  },
473
- // port: 8080,
474
- // useLocalIp:true,
474
+ port: devServer?.port??8080,
475
+ useLocalIp:devServer?.useLocalIp??false,
475
476
  https:https,//true,//注意开了https就不能使用本地ip访问,只能使用0.0.0.0
476
477
  proxy: API_CONFIG.API_PROXY
477
478
  // hot: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kn-cli",
3
- "version": "1.0.57",
3
+ "version": "1.0.59",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/readme.md CHANGED
@@ -65,10 +65,18 @@ module.exports = {
65
65
  // rules:{
66
66
  // compileNpmPackage:['kn-hooks'],//需要参与编译的npm包
67
67
  // },
68
+ // devServer:{
69
+ // host:'0.0.0.0',//指定调试地址IP
70
+ // port:8080,
71
+ // useLocalIp:false,//是否使用本地IP地址代替localhost
72
+ // }
68
73
  };
69
74
  ```
70
75
 
71
76
  # 更新日志
77
+ * 1.0.57
78
+ 增加cli.config.js内devServer配置
79
+
72
80
  * 1.0.56
73
81
  OA模板更新
74
82
 
package/src/build.js CHANGED
@@ -315,6 +315,7 @@ module.exports= async (options={})=> {
315
315
  throw new Error(`
316
316
  ==============执行build异常=============
317
317
  ${req.stdout}
318
+ ${req.stderr}
318
319
  ==============执行build异常END=============
319
320
  `);
320
321
  }
@@ -4,7 +4,7 @@ then
4
4
  fi
5
5
 
6
6
  export mock=0
7
- export oSkipNpmInstall=1
7
+ export noSkipNpmInstall=1
8
8
  node_version="v16.18.0"
9
9
 
10
10
  checkNode(){
@@ -0,0 +1,6 @@
1
+ **/node_modules
2
+ **/package-lock.json
3
+ **/.DS_Store
4
+ **/dist
5
+ **/release
6
+
@@ -4,7 +4,7 @@ then
4
4
  fi
5
5
 
6
6
  export mock=0
7
- export oSkipNpmInstall=1
7
+ export noSkipNpmInstall=1
8
8
  node_version="v16.18.0"
9
9
 
10
10
  checkNode(){
@@ -4,7 +4,7 @@ then
4
4
  fi
5
5
 
6
6
  export mock=0
7
- export oSkipNpmInstall=1
7
+ export noSkipNpmInstall=1
8
8
  node_version="v16.18.0"
9
9
 
10
10
  checkNode(){
Binary file