Skip to content

Commit cf08a69

Browse files
author
Kevin Souza
authored
Merge pull request #2 from Kyagara/electron
Rewrite it in Typescript
2 parents 864b169 + 0e080e7 commit cf08a69

File tree

127 files changed

+11070
-13682
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+11070
-13682
lines changed

.github/assets/screenshot-1.jpg

-536 KB
Binary file not shown.

.github/assets/screenshot-1.webp

97 KB
Loading

.github/assets/screenshot-2.jpg

-454 KB
Binary file not shown.

.github/assets/screenshot-2.webp

155 KB
Loading

.github/workflows/build.yaml

Lines changed: 56 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,76 @@
1-
name: "build"
1+
name: build
22

33
on:
44
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
5+
branches:
6+
- electron
7+
paths:
8+
- "**.ts"
9+
- "**.js"
10+
- "**.mjs"
11+
- "**.json"
12+
- "**.svelte"
13+
- ".github/workflows/build.yaml"
14+
workflow_dispatch:
815

916
jobs:
10-
build:
11-
runs-on: ubuntu-latest
17+
release:
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [ubuntu-latest, macos-latest, windows-latest]
22+
23+
runs-on: ${{ matrix.os }}
24+
1225
steps:
1326
- uses: actions/checkout@v4
1427

15-
- name: Install Ubuntu dependencies
16-
run: |
17-
sudo apt-get update
18-
sudo apt-get install -y libwebkit2gtk-4.1-dev libasound2-dev libappindicator3-dev librsvg2-dev patchelf nsis lld llvm ninja-build nasm
19-
20-
- name: Setup node
28+
- name: Install Node.js
2129
uses: actions/setup-node@v4
2230
with:
23-
cache: "npm"
24-
node-version: lts/*
31+
node-version: 22
32+
cache: npm
33+
cache-dependency-path: "**/package-lock.json"
2534

26-
- name: Install npm dependencies
35+
- name: Install dependencies
2736
run: npm ci
2837

29-
- name: Run frontend lint
30-
run: npm run lint && npm run check
31-
32-
- name: Install Rust
33-
uses: dtolnay/rust-toolchain@stable
34-
with:
35-
targets: x86_64-pc-windows-msvc
36-
37-
- name: Cache cargo-xwin
38-
uses: actions/cache@v4
39-
with:
40-
path: ~/.xwin
41-
key: xwin-${{ hashFiles('**/Cargo.lock') }}
42-
restore-keys: |
43-
xwin-
44-
45-
- uses: Swatinem/rust-cache@v2
46-
with:
47-
workspaces: "./src-tauri -> target"
48-
49-
- name: Install cargo-xwin
50-
run: cargo install --locked cargo-xwin
51-
52-
- name: Run clippy
53-
working-directory: src-tauri
54-
run: cargo clippy
38+
- name: Run lint and typecheck
39+
if: matrix.os == 'ubuntu-latest'
40+
run: npm run lint && npm run typecheck
5541

5642
- name: Build for Linux
57-
run: npm run tauri build
43+
if: matrix.os == 'ubuntu-latest'
44+
run: npm run build:linux
45+
46+
- name: Build for macOS
47+
if: matrix.os == 'macos-latest'
48+
run: npm run build:mac
5849

5950
- name: Build for Windows
60-
run: npm run tauri build -- --runner cargo-xwin --target x86_64-pc-windows-msvc -- --xwin-cache-dir ~/.xwin
51+
if: matrix.os == 'windows-latest'
52+
run: npm run build:win
6153

62-
- name: Create bundles folder and move artifacts
63-
run: |
64-
mkdir -p bundles
65-
mv src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe bundles
66-
mv src-tauri/target/release/bundle/rpm/*.rpm bundles
67-
mv src-tauri/target/release/bundle/deb/*.deb bundles
54+
- name: Upload Linux installer
55+
if: matrix.os == 'ubuntu-latest'
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: linux
59+
path: ./dist/rt-*-linux.deb
60+
compression-level: 0
61+
62+
- name: Upload macOS installer
63+
if: matrix.os == 'macos-latest'
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: mac
67+
path: ./dist/rt-*-mac.dmg
68+
compression-level: 0
6869

69-
- uses: actions/upload-artifact@v4
70+
- name: Upload Windows installer
71+
if: matrix.os == 'windows-latest'
72+
uses: actions/upload-artifact@v4
7073
with:
71-
name: bundles
72-
path: bundles
74+
name: windows
75+
path: ./dist/rt-*-win.exe
76+
compression-level: 0

.gitignore

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
.vscode
2-
31
node_modules
4-
.svelte-kit
5-
build
6-
7-
src-tauri/target
8-
src-tauri/gen/schemas
2+
dist
3+
out
4+
.DS_Store
5+
.eslintcache
6+
electron.vite.config.*.mjs
7+
*.log*

.prettierignore

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package-lock.json
2-
src-tauri
3-
.svelte-kit
4-
build
52
node_modules
63
.github
7-
README.md
4+
out
5+
dist
6+
README.md
7+
LICENSE.md
8+
tsconfig.json
9+
tsconfig.*.json

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"useTabs": true,
33
"singleQuote": true,
4+
"semi": false,
45
"trailingComma": "none",
56
"printWidth": 100,
67
"endOfLine": "lf",

.vscode/launch.json

Lines changed: 39 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"html.customData": ["./node_modules/vidstack/vscode.html-data.json"]
3+
}

0 commit comments

Comments
 (0)