Skip to content

Commit c8f447d

Browse files
committed
init
0 parents  commit c8f447d

35 files changed

+21205
-0
lines changed

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
out
4+
.gitignore

.eslintrc.cjs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
extends: [
3+
'eslint:recommended',
4+
'plugin:react/recommended',
5+
'plugin:react/jsx-runtime',
6+
'@electron-toolkit/eslint-config-ts/recommended',
7+
'@electron-toolkit/eslint-config-prettier'
8+
]
9+
}

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
dist
3+
out
4+
.DS_Store
5+
*.log*

.prettierignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
out
2+
dist
3+
pnpm-lock.yaml
4+
LICENSE.md
5+
tsconfig.json
6+
tsconfig.*.json

.prettierrc.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
singleQuote: true
2+
semi: false
3+
printWidth: 100
4+
trailingComma: none

.vscode/extensions.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["dbaeumer.vscode-eslint"]
3+
}

.vscode/launch.json

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Debug Main Process",
6+
"type": "node",
7+
"request": "launch",
8+
"cwd": "${workspaceRoot}",
9+
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite",
10+
"windows": {
11+
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite.cmd"
12+
},
13+
"runtimeArgs": ["--sourcemap"],
14+
"env": {
15+
"REMOTE_DEBUGGING_PORT": "9222"
16+
}
17+
},
18+
{
19+
"name": "Debug Renderer Process",
20+
"port": 9222,
21+
"request": "attach",
22+
"type": "chrome",
23+
"webRoot": "${workspaceFolder}/src/renderer",
24+
"timeout": 60000,
25+
"presentation": {
26+
"hidden": true
27+
}
28+
}
29+
],
30+
"compounds": [
31+
{
32+
"name": "Debug All",
33+
"configurations": ["Debug Main Process", "Debug Renderer Process"],
34+
"presentation": {
35+
"order": 1
36+
}
37+
}
38+
]
39+
}

.vscode/settings.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"[typescript]": {
3+
"editor.defaultFormatter": "esbenp.prettier-vscode"
4+
},
5+
"[javascript]": {
6+
"editor.defaultFormatter": "esbenp.prettier-vscode"
7+
},
8+
"[json]": {
9+
"editor.defaultFormatter": "esbenp.prettier-vscode"
10+
}
11+
}

README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# agf
2+
3+
An Electron application with React and TypeScript
4+
5+
## Recommended IDE Setup
6+
7+
- [VSCode](https://code.visualstudio.com/) + [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
8+
9+
## Project Setup
10+
11+
### Install
12+
13+
```bash
14+
$ npm install
15+
```
16+
17+
### Development
18+
19+
```bash
20+
$ npm run dev
21+
```
22+
23+
### Build
24+
25+
```bash
26+
# For windows
27+
$ npm run build:win
28+
29+
# For macOS
30+
$ npm run build:mac
31+
32+
# For Linux
33+
$ npm run build:linux
34+
```

build/entitlements.mac.plist

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.cs.allow-jit</key>
6+
<true/>
7+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
8+
<true/>
9+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
10+
<true/>
11+
</dict>
12+
</plist>

build/icon.icns

83.6 KB
Binary file not shown.

build/icon.ico

121 KB
Binary file not shown.

build/icon.png

35.1 KB
Loading

dev-app-update.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
provider: generic
2+
url: https://example.com/auto-updates
3+
updaterCacheDirName: agf-updater

electron-builder.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
appId: com.electron.app
2+
productName: agf
3+
directories:
4+
buildResources: build
5+
files:
6+
- '!**/.vscode/*'
7+
- '!src/*'
8+
- '!electron.vite.config.{js,ts,mjs,cjs}'
9+
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
10+
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
11+
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
12+
asarUnpack:
13+
- resources/**
14+
win:
15+
executableName: agf
16+
nsis:
17+
artifactName: ${name}-${version}-setup.${ext}
18+
shortcutName: ${productName}
19+
uninstallDisplayName: ${productName}
20+
createDesktopShortcut: always
21+
mac:
22+
entitlementsInherit: build/entitlements.mac.plist
23+
extendInfo:
24+
- NSCameraUsageDescription: Application requests access to the device's camera.
25+
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
26+
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
27+
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
28+
notarize: false
29+
dmg:
30+
artifactName: ${name}-${version}.${ext}
31+
linux:
32+
target:
33+
- AppImage
34+
- snap
35+
- deb
36+
maintainer: electronjs.org
37+
category: Utility
38+
appImage:
39+
artifactName: ${name}-${version}.${ext}
40+
npmRebuild: false
41+
publish:
42+
provider: generic
43+
url: https://example.com/auto-updates

electron.vite.config.ts

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { resolve } from 'path'
2+
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
3+
import react from '@vitejs/plugin-react'
4+
5+
export default defineConfig({
6+
main: {
7+
plugins: [externalizeDepsPlugin()]
8+
},
9+
preload: {
10+
plugins: [externalizeDepsPlugin()]
11+
},
12+
renderer: {
13+
resolve: {
14+
alias: {
15+
'@renderer': resolve('src/renderer/src')
16+
}
17+
},
18+
plugins: [react()]
19+
}
20+
})

0 commit comments

Comments
 (0)