Skip to content

Commit

Permalink
新增github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lmn_741 committed Sep 4, 2024
1 parent ffb7417 commit 9ae21b6
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ yarn-debug.log*
yarn-error.log*

/.idea
webstorm.config.js*
#webstorm.config.js*
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## 1、项目结构

```
├── electron-basic # 桌面应用
├── electron-react # 桌面应用
├── build # web包编译后资源目录
├── extraResources # 视窗额外打包文件(比如各种执行的cmd/py脚本)
├── public # web包编译前资源目录
Expand Down Expand Up @@ -45,11 +45,12 @@
开发环境
npm run start
生产环境
编译生产环境
npm run build
启动测试环境: npm run start:web
启动开发环境: npm run start 可以进行调试
编译测试or仿真环境
npm run build:test
```

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"test": "electron . test",
"build:test:web": "env-cmd -f .env.test craco build",
"build:web": "cross-env REACT_APP_ENVIRONMENT=production craco build --win",
"build:test": "rimraf build && env-cmd -f .env.test craco build && rimraf release && electron-builder",
"build": "rimraf build && npm run build:web && rimraf release && electron-builder",
"build:deb": "electron-builder --linux deb tar.xz",
"build:deb:arm64": "electron-builder --linux deb --arm64",
Expand Down
25 changes: 25 additions & 0 deletions webstorm.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* @author Kevin
* @Date: 2024-4-10
*/
'use strict'
const path = require('path')

module.exports = {
context: path.resolve(__dirname, './'),
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'@': path.resolve('src'),
'@statics': path.resolve(__dirname, 'src/statics'),
'@views': path.resolve(__dirname, 'src/views'),
'@comp': path.resolve(__dirname, 'src/components'),
'@services': path.resolve(__dirname, 'src/services'),
'@api': path.resolve(__dirname, 'src/api'),
'@utils': path.resolve(__dirname, 'src/utils'),
'@redux': path.resolve(__dirname, 'src/redux'),
'@styles': path.resolve(__dirname, 'src/styles'),
'@configs': path.resolve(__dirname, 'src/configs'),
}
}
}

0 comments on commit 9ae21b6

Please sign in to comment.