Browse Source

更新打包插件

Caner 2 years ago
parent
commit
73553c371d
6 changed files with 350 additions and 466 deletions
  1. 2 1
      .eslintrc.json
  2. 0 1
      index.html
  3. 18 23
      package.json
  4. 1 2
      tsconfig.json
  5. 0 2
      vite.config.ts
  6. 329 437
      yarn.lock

+ 2 - 1
.eslintrc.json

@@ -38,6 +38,7 @@
     "prefer-destructuring": 0,
     "no-new": 0,
     "func-names": 0,
-    "no-nested-ternary": 0
+    "no-nested-ternary": 0,
+    "import/no-extraneous-dependencies": 0 
   }
 }

+ 0 - 1
index.html

@@ -10,7 +10,6 @@
 <body>
   <div id="app"></div>
   <script type="module" src="./src/main.ts"></script>
-  <script src="./loader.js"></script>
 </body>
 
 </html>

+ 18 - 23
package.json

@@ -1,51 +1,46 @@
 {
-  "name": "demo",
+  "name": "contrl-client",
   "version": "1.0.0",
   "main": "electron/main.js",
   "author": "Caner",
-  "description": "one electron vite vue demo",
+  "description": "控制端",
   "scripts": {
     "dev": "vite",
-    "build": "vue-tsc --noEmit && vite build && yarn pmake",
-    "make": "electron-forge make",
-    "pmake": "electron-forge package"
+    "build": "vue-tsc --noEmit && vite build && electron-builder build"
   },
   "dependencies": {
-    "vue": "^3.3.2",
-    "vue-router": "^4.2.0"
+    "request": "^2.88.2"
   },
   "devDependencies": {
-    "@electron-forge/cli": "^6.1.1",
-    "@electron-forge/maker-zip": "^6.1.1",
     "@types/node": "^18.15.3",
     "@typescript-eslint/parser": "^5.40.0",
     "@vitejs/plugin-vue": "^4.2.3",
     "electron": "^23.1.2",
+    "electron-builder": "^23.6.0",
     "eslint": "^8.40.0",
     "eslint-config-airbnb-base": "^15.0.0",
     "eslint-plugin-import": "^2.27.5",
     "eslint-plugin-vue": "^9.13.0",
-    "request": "^2.88.2",
     "sass": "^1.63.3",
     "typescript": "~5.0.4",
     "vite": "^4.3.6",
-    "vite-plugin-compression": "^0.5.1",
     "vite-plugin-electron": "^0.11.2",
     "vite-plugin-eslint": "^1.8.1",
     "vite-plugin-svg-icons": "^2.0.1",
+    "vue": "^3.3.2",
+    "vue-router": "^4.2.0",
     "vue-tsc": "^1.6.5"
   },
-  "config": {
-    "forge": {
-      "packagerConfig": {
-        "asar": true,
-        "ignore": "(dist-electron|out|vite.config.ts|README.md|.env|.gitignore|.eslintrc.json|src|public|node_modules|package-lock.json)"
-      },
-      "makers": [
-        {
-          "name": "@electron-forge/maker-zip"
-        }
-      ]
-    }
+  "build": {
+    "directories": {
+      "output": "out"
+    },
+    "files": [
+      "dist/js",
+      "dist/assets",
+      "dist/index.html",
+      "electron"
+    ],
+    "asar": true
   }
 }

+ 1 - 2
tsconfig.json

@@ -18,8 +18,7 @@
       "strict": true,
       "noUnusedLocals": true,
       "noUnusedParameters": true,
-      "noFallthroughCasesInSwitch": true,
-      "types": ["vite-plugin-svg-icons/client"]
+      "noFallthroughCasesInSwitch": true
   },
   "include": [
     "*.d.ts",

+ 0 - 2
vite.config.ts

@@ -1,7 +1,6 @@
 import { defineConfig } from 'vite'
 import vue from '@vitejs/plugin-vue'
 import eslint from 'vite-plugin-eslint'
-import viteCompression from 'vite-plugin-compression'
 import { resolve } from 'path'
 import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
 import electron from 'vite-plugin-electron'
@@ -15,7 +14,6 @@ export default () => defineConfig({
   },
   plugins: [
     vue(),
-    viteCompression(),
     eslint({ fix: true, include: ['**/*.ts', '**/*.vue'] }),
     createSvgIconsPlugin({
       iconDirs: [resolve(__dirname, './src/assets/icons')],

File diff suppressed because it is too large
+ 329 - 437
yarn.lock


Some files were not shown because too many files changed in this diff