seimin 2 年 前
コミット
92f2eeee1b
共有1 個のファイルを変更した7 個の追加3 個の削除を含む
  1. 7 3
      upload/development.js

+ 7 - 3
upload/development.js

@@ -35,9 +35,13 @@ function connectSSh() {
35
 function runTask() {
35
 function runTask() {
36
   //打包完成
36
   //打包完成
37
   if (shell.exec(`npm run build`).code == 0) {
37
   if (shell.exec(`npm run build`).code == 0) {
38
-    console.log("-----打包成功-----");
39
-    //提交上传
40
-    connectSSh();
38
+    if (shell.exec(`find dist -name '*.js' -print0 | xargs -0 gzip -k`).code == 0) {
39
+      if (shell.exec(`find dist -name '*.css' -print0 | xargs -0 gzip -k`).code == 0) {
40
+        console.log("-----打包成功-----");
41
+        //提交上传
42
+        connectSSh();
43
+      }
44
+    }
41
   }
45
   }
42
 }
46
 }
43
 runTask()
47
 runTask()