Sfoglia il codice sorgente

chore: 调整打包相关代码

lanjianrong 4 anni fa
parent
commit
9d651b2893
4 ha cambiato i file con 29 aggiunte e 14 eliminazioni
  1. 1 1
      .eslintignore
  2. 1 0
      .gitignore
  3. 25 12
      deploy.config.js
  4. 2 1
      package.json

+ 1 - 1
.eslintignore

@@ -5,4 +5,4 @@
 /src/serviceWorker.ts
 /src/setupTests.ts
 /scripts
-/.vscode
+/deploy.config.js

+ 1 - 0
.gitignore

@@ -8,3 +8,4 @@ dist
 /.vscode
 .vscode
 .eslintcache
+deploy.config.js

+ 25 - 12
deploy.config.js

@@ -1,15 +1,28 @@
 module.exports = {
-  "win": {
-    "script": "npm run build",
-    "host": "192.168.1.76",
-    "port": 22,
-    "username": "zongheng",
-    "password": "SmartCost#*%)888",
-    "localPath": "build",
-    "remotePath": "/mnt/html/management/",
-    "needEmail": false,
-    "addressee": "",
-    "title": "",
-    "content": ""
+  qa: {
+    script: 'npm run build',
+    host: '192.168.1.76',
+    port: 22,
+    username: 'zongheng',
+    password: 'SmartCost#*%)888',
+    localPath: 'dist',
+    remotePath: '/mnt/html/management',
+    needEmail: false,
+    addressee: '',
+    title: '',
+    content: ''
+  },
+  prod: {
+    script: 'npm run build',
+    host: '39.108.111.147',
+    port: 22,
+    username: 'root',
+    password: 'SmartCost3850888',
+    localPath: 'dist',
+    remotePath: '/mnt/html/management',
+    needEmail: false,
+    addressee: '',
+    title: '',
+    content: ''
   }
 }

+ 2 - 1
package.json

@@ -7,7 +7,8 @@
     "dev": "node scripts/start.js",
     "build": "node scripts/build.js",
     "test": "node scripts/test.js",
-    "deploy": "auto-deploy build -t win",
+    "deploy:qa": "auto-deploy build -t qa",
+    "deploy:prod": "auto-deploy build -t prod",
     "lint": "npm run lint:js && npm run lint:style && npm run lint:prettier",
     "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ",
     "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx ./src && npm run lint:style",