Skip to content

Commit

Permalink
Merge pull request #61 from jumpserver/pr@master@new_build
Browse files Browse the repository at this point in the history
perf: Add new build
  • Loading branch information
ZhaoJiSen authored Oct 14, 2024
2 parents 4ddc369 + 1539e7b commit 6d11c51
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions build/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { execSync } from 'child_process';
import os from 'os';

execSync('vite build');

const platform = os.platform();

if (platform === 'darwin') {
execSync('electron-builder --mac --win --linux');
} else {
execSync('electron-builder --win --linux');
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "dist-electron/main.js",
"scripts": {
"dev": "vite",
"build": "vite build && electron-builder --mac --win --linux",
"build": "node build/index.js",
"buildapp": "vite build && electron-builder --mac --win --linux",
"preview": "vite preview"
},
Expand Down

0 comments on commit 6d11c51

Please sign in to comment.