Browse Source

修改编译配置

yingp 7 years ago
parent
commit
2be9b335c8
2 changed files with 36 additions and 51 deletions
  1. 33 48
      frontend/saas-web/app.json
  2. 3 3
      frontend/saas-web/package.json

+ 33 - 48
frontend/saas-web/app.json

@@ -275,6 +275,39 @@
         "cacheParam": "_dc"
     },
 
+    "builds": {
+        "dev": {
+            "server": {
+                "accountCenter":"http://192.168.0.181:8000",
+                "accountEnterprise":"http://192.168.0.181:8000/#/enterprise",
+                "basePath": {
+                    "https": "https://saas-api-dev.usoftchina.com:5443",
+                    "http": "http://192.168.0.181:8560"
+                },
+                "urlPattern": "^\/api\/"
+            }
+        },
+        "test": {
+            "server": {
+                "accountCenter": "https://saas-test.usoftchina.com:5443",
+                "accountEnterprise": "https://saas-test.usoftchina.com:5443/#/enterprise",
+                "basePath": {
+                    "https": "https://saas-api-test.usoftchina.com:5443",
+                    "http": "http://192.168.0.181:8575"
+                },
+                "urlPattern": "^\/api\/"
+            }
+        },
+        "prod": {
+            "server": {
+                "accountCenter":"https://saas.usoftchina.com",
+                "accountEnterprise":"https://saas.usoftchina.com/#/enterprise",
+                "basePath": "https://saas-api.usoftchina.com",
+                "urlPattern": "^\/api\/"
+            }
+        }
+    },
+
     /**
      * Settings specific to production builds.
      */
@@ -293,12 +326,6 @@
         },
         "compressor": {
             "type": "yui"
-        },
-        "server": {
-            "accountCenter":"https://saas.usoftchina.com",
-            "accountEnterprise":"https://saas.usoftchina.com/#/enterprise",
-            "basePath": "https://saas-api.usoftchina.com",
-            "urlPattern": "^\/api\/"
         }
     },
 
@@ -306,39 +333,6 @@
      * Settings specific to testing builds.
      */
     "testing": {
-        "output": {
-            "appCache": {
-                "enable": true,
-                "path": "cache.appcache"
-            }
-        },
-        "loader": {
-            "cache": "${build.timestamp}"
-        },
-        "cache": {
-            "enable": true
-        },
-        "compressor": {
-            "type": "yui"
-        },
-        "server": {
-            /** 暂时更改
-            "accountCenter": "https://saas-test.usoftchina.com:5443",
-            "accountEnterprise": "https://saas-test.usoftchina.com:5443/#/enterprise",
-            "basePath": {
-                "https": "https://saas-api-test.usoftchina.com:5443",
-                "http": "http://192.168.0.181:8575"
-            },
-            "urlPattern": "^\/api\/"
-            **/
-            "accountCenter":"http://192.168.0.181:8000",
-            "accountEnterprise":"http://192.168.0.181:8000/#/enterprise",
-            "basePath": {
-                "https": "https://saas-api-dev.usoftchina.com:5443",
-                "http": "http://192.168.0.181:8560"
-            },
-            "urlPattern": "^\/api\/"
-        }
     },
 
     /**
@@ -347,15 +341,6 @@
     "development": {
         "watch": {
             "delay": 250
-        },
-        "server": {
-            "accountCenter":"http://192.168.0.181:8000",
-            "accountEnterprise":"http://192.168.0.181:8000/#/enterprise",
-            "basePath": {
-                "https": "https://saas-api-dev.usoftchina.com:5443",
-                "http": "http://192.168.0.181:8560"
-            },
-            "urlPattern": "^\/api\/"
         }
     },
 

+ 3 - 3
frontend/saas-web/package.json

@@ -6,9 +6,9 @@
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1",
     "dev": "sencha app watch",
-    "build-dev": "sencha app build --development",
-    "build-test": "sencha app build --testing",
-    "build": "sencha app build --production"
+    "build-dev": "sencha app build --build dev --testing",
+    "build-test": "sencha app build --build test --production",
+    "build": "sencha app build --build prod --production"
   },
   "keywords": [
     "saas"