Skip to content

Commit

Permalink
Merge pull request #1072 from chat2db/refactor-electron
Browse files Browse the repository at this point in the history
Refactor electron
  • Loading branch information
shanhexi authored Jan 8, 2024
2 parents 38cf952 + 50a76d1 commit 7fcf5f3
Show file tree
Hide file tree
Showing 8 changed files with 816 additions and 40 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ jobs:
cp -r dist/index.html ../chat2db-server/chat2db-server-start/src/main/resources/thymeleaf/
cd src/main
yarn
yarn run build
# 编译服务端java版本
- name: Build Java
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ jobs:
cp -r dist/index.html ../chat2db-server/chat2db-server-start/src/main/resources/thymeleaf/
cd src/main
yarn
yarn run build
# 打包后端工程 & 发送到前端
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release_test_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ jobs:
cp -r dist/index.html ../chat2db-server/chat2db-server-start/src/main/resources/thymeleaf/
cd src/main
yarn
yarn run build
# 打包后端工程 & 发送到前端
- name: Build BE Static
Expand Down
1 change: 1 addition & 0 deletions chat2db-client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/src/.umi-production
/src/.umi-test
/src/main/node_modules
/src/main/dist
/dist
.swc
./yarn-error.log
Expand Down
8 changes: 2 additions & 6 deletions chat2db-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/chat2db/Chat2DB"
},
"author": "fjy, hexi",
"main": "src/main/index.js",
"main": "src/main/dist/index.js",
"scripts": {
"build": "npm run build:web && npm run build:main",
"build:desktop": "npm run build:web:desktop && npm run build:main:prod",
Expand All @@ -33,15 +33,13 @@
"copy-to-clipboard": "^3.3.3",
"echarts": "^5.4.2",
"echarts-for-react": "^3.0.2",
"electron-log": "^4.4.8",
"event-source-polyfill": "^1.0.31",
"highlight.js": "^11.9.0",
"lodash": "^4.17.21",
"markdown-it-link-attributes": "^4.0.1",
"monaco-editor": "^0.44.0",
"monaco-editor-esm-webpack-plugin": "^2.1.0",
"monaco-editor-webpack-plugin": "^7.0.1",
"node-machine-id": "^1.1.12",
"react-monaco-editor": "^0.54.0",
"react-sortablejs": "^6.1.4",
"sql-formatter": "^13.0.4",
Expand Down Expand Up @@ -98,12 +96,10 @@
"asar": false,
"files": [
"dist/**/*",
"static/",
"src/main",
"src/main/node_modules/**/*",
"versions/**/*",
"package.json",
"!./node_modules/**/*"
"!node_modules/**/*"
],
"nsis": {
"oneClick": false,
Expand Down
4 changes: 4 additions & 0 deletions chat2db-client/src/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@
"electron-store": "^8.1.0",
"node-machine-id": "^1.1.12",
"uuid": "^9.0.1"
},
"devDependencies": {
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
}
}
3 changes: 2 additions & 1 deletion chat2db-client/src/main/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const path = require('path');
module.exports = {
entry: './index.js',
output: {
filename: 'main.js',
filename: 'index.js',
path: path.resolve(__dirname, 'dist'),
},
target: 'node'
};
Loading

0 comments on commit 7fcf5f3

Please sign in to comment.