kn-cli 1.0.36 → 1.0.38

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.
@@ -3,12 +3,12 @@
3
3
  "version": "1.0.0",
4
4
  "main": "lib/index",
5
5
  "scripts": {
6
- "dev": "cross-env webpack-dev-server",
7
- "dev:watch": "cross-env webpack -w",
8
- "start": "cross-env webpack-dev-server -d",
9
- "build": "cross-env webpack -p --colors --mode production",
10
- "build:dev": "cross-env webpack -p --colors --mode production",
11
- "report": "cross-env npm_config_report=true npm run build"
6
+ "dev": "webpack-dev-server",
7
+ "dev:watch": "webpack -w",
8
+ "start": "webpack-dev-server -d",
9
+ "build": "webpack -p --colors --mode production",
10
+ "build:dev": "webpack -p --colors --mode production",
11
+ "report": "npm run build"
12
12
  },
13
13
  "license": "MIT",
14
14
  "dependencies": {},
@@ -32,7 +32,6 @@
32
32
  "bundle-loader": "~0.5.2",
33
33
  "clean-webpack-plugin": "~3.0.0",
34
34
  "copy-webpack-plugin": "6.4.1",
35
- "cross-env": "~7.0.0",
36
35
  "css-loader": "~3.6.0",
37
36
  "eslint": "~7.4.0",
38
37
  "eslint-config-alloy": "~3.7.3",
package/build/report.sh CHANGED
@@ -42,7 +42,7 @@ checkNode(){
42
42
  export build_env=prod
43
43
  export mock=0
44
44
  export noSkipNpmInstall=1
45
-
45
+ export report=1
46
46
  dev(){
47
47
  npm config delete registry -g
48
48
  npm config delete registry
package/build/start.sh CHANGED
@@ -45,20 +45,20 @@ setEnv(){
45
45
  if [ ! -n "$build_env" ]
46
46
  then
47
47
  read -p "选择环境 [1:本地调试] [2:测试] [3:生产] " apiEnv
48
+ if [ ! -n "$apiEnv" ]
49
+ then
50
+ export build_env="localdebug"
51
+ elif [ $apiEnv = "2" ]
52
+ then
53
+ export build_env="dev"
54
+ elif [ $apiEnv = "3" ]
55
+ then
56
+ export build_env="prod"
57
+ else
58
+ export build_env="localdebug"
59
+ fi
48
60
  fi
49
61
 
50
- if [ ! -n "$apiEnv" ]
51
- then
52
- export build_env="localdebug"
53
- elif [ $apiEnv = "2" ]
54
- then
55
- export build_env="dev"
56
- elif [ $apiEnv = "3" ]
57
- then
58
- export build_env="prod"
59
- else
60
- export build_env="localdebug"
61
- fi
62
62
  echo "编译环境:$build_env"
63
63
  }
64
64
 
@@ -424,7 +424,7 @@ plugins.push(
424
424
  }),
425
425
  )
426
426
 
427
- if (process.env.npm_config_report) {
427
+ if (process.env.report) {
428
428
  plugins.push(new BundleAnalyzerPlugin());
429
429
  }
430
430
  if (!devMode) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kn-cli",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/readme.md CHANGED
@@ -65,6 +65,12 @@ module.exports = {
65
65
  ```
66
66
 
67
67
  # 更新日志
68
+ * 1.0.38
69
+ 编译环境被强制变为localdebug的问题
70
+
71
+ * 1.0.37
72
+ 去掉cross_env
73
+
68
74
  * 1.0.36
69
75
  优化shell脚本
70
76
 
@@ -0,0 +1,6 @@
1
+ **/node_modules
2
+ **/package-lock.json
3
+ **/.DS_Store
4
+ **/dist
5
+ **/release
6
+
@@ -1,5 +1,6 @@
1
1
 
2
2
  module.exports = {
3
+ name:'template-app',
3
4
  registryType:'npm',//npm镜像源,taobao|npm
4
5
  less:{
5
6
  javascriptEnabled:false,//是否开启less js