Skip to content

Commit 805aff6

Browse files
committed
Migrated to electron-vite, migrated to ECMAScript modules
1 parent 35aa231 commit 805aff6

Some content is hidden

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

63 files changed

+3049
-6080
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+
}

.github/workflows/code-scan.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ jobs:
4242
- name: Set up latest available Nodejs
4343
uses: actions/setup-node@master
4444
- name: Install dependencies
45-
run: npm install
45+
run: yarn install
4646
- name: Build
47-
run: yarn run build
47+
run: yarn build
4848
- name: Run tests
4949
run: yarn run test
5050
- name: Upload coverage reports to Codecov

.github/workflows/prepare-release.yml

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Prepare releases
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
jobs:
7+
trigger-flathub_build:
8+
name: Trigger Flathub build bot
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Trigger Flathub build
12+
uses: peter-evans/repository-dispatch@v3
13+
with:
14+
token: ${{ secrets.TRIGGER_FLATHUB_BUILD }}
15+
repository: ransome1/com.github.ransome1.sleek
16+
event-type: trigger-flathub-build
17+
client-payload: '{"commit_id": "${{ github.sha }}"}'
18+
macos:
19+
name: MacOS (Prepare release)
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
matrix:
23+
os: [macos-latest]
24+
steps:
25+
- name: Checkout git repo
26+
uses: actions/checkout@master
27+
- name: Install Node and NPM
28+
uses: actions/setup-node@master
29+
with:
30+
node-version: 23
31+
cache: 'yarn'
32+
- name: Install and build
33+
run: |
34+
yarn --network-timeout 100000
35+
yarn run build
36+
- name: Run Electron Builder
37+
uses: samuelmeuli/action-electron-builder@v1
38+
env:
39+
CSC_LINK: ${{ secrets.CSC_LINK }}
40+
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
41+
APPLE_ID: ${{ secrets.APPLE_ID }}
42+
APPLE_ID_PASS: ${{ secrets.APPLE_ID_PASS }}
43+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
44+
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
45+
with:
46+
max_attempts: 5
47+
github_token: ${{ secrets.github_token }}
48+
release: ${{ startsWith(github.ref, 'refs/tags/') }}
49+
windows:
50+
name: Windows (Prepare release)
51+
runs-on: ${{ matrix.os }}
52+
strategy:
53+
matrix:
54+
os: [windows-latest]
55+
steps:
56+
- name: Checkout git repo
57+
uses: actions/checkout@master
58+
- name: Install Node and NPM
59+
uses: actions/setup-node@master
60+
with:
61+
node-version: 23
62+
cache: 'yarn'
63+
- name: Install and build
64+
run: |
65+
yarn --network-timeout 100000
66+
yarn run build
67+
- name: Run Electron Builder
68+
uses: samuelmeuli/action-electron-builder@v1
69+
with:
70+
max_attempts: 5
71+
github_token: ${{ secrets.github_token }}
72+
release: ${{ startsWith(github.ref, 'refs/tags/') }}
73+
linux:
74+
name: Linux (Prepare release)
75+
runs-on: ${{ matrix.os }}
76+
strategy:
77+
matrix:
78+
os: [ubuntu-latest]
79+
steps:
80+
- name: Checkout git repo
81+
uses: actions/checkout@master
82+
- name: Install Node and NPM
83+
uses: actions/setup-node@master
84+
with:
85+
node-version: 23
86+
cache: 'yarn'
87+
- name: Install and build
88+
run: |
89+
yarn --network-timeout 100000
90+
yarn run build
91+
- name: Run Electron Builder
92+
uses: samuelmeuli/action-electron-builder@v1
93+
with:
94+
max_attempts: 5
95+
github_token: ${{ secrets.github_token }}
96+
release: ${{ startsWith(github.ref, 'refs/tags/') }}

.github/workflows/release.yml

-116
This file was deleted.

.gitignore

100755100644
+7-1
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,10 @@ typings/
9292
out/
9393

9494
# Provisionong profiles
95-
*.provisionprofile
95+
*.provisionprofile
96+
97+
dist/
98+
99+
mas/
100+
101+
build/

.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

assets/dmg-background.png

-2.78 KB
Binary file not shown.

assets/dmg/background.tiff

189 KB
Binary file not shown.

assets/entitlements.mac.plist

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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-unsigned-executable-memory</key>
6+
<true/>
7+
<key>com.apple.security.cs.allow-jit</key>
8+
<true/>
9+
</dict>
10+
</plist>
File renamed without changes.
File renamed without changes.

electron-builder.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
directories:
2+
output: dist
3+
buildResources: build
4+
buildVersion: '50'
5+
asar: true
6+
mac:
7+
appId: com.todotxt.sleek
8+
target:
9+
target: default
10+
arch:
11+
- arm64
12+
- x64
13+
fileAssociations:
14+
- ext:
15+
- txt
16+
- md
17+
role: Editor
18+
isPackage: false
19+
rank: Owner
20+
icon: ./assets/icons/icon.icns
21+
type: distribution
22+
hardenedRuntime: true
23+
entitlements: assets/entitlements.mac.plist
24+
entitlementsInherit: assets/entitlements.mac.plist
25+
gatekeeperAssess: false
26+
category: public.app-category.productivity
27+
artifactName: ${productName}-${version}-mac-${arch}.${ext}
28+
darkModeSupport: true
29+
dmg:
30+
background: assets/dmg/background.tiff
31+
contents:
32+
- x: 130
33+
'y': 220
34+
- x: 410
35+
'y': 220
36+
type: link
37+
path: /Applications
38+
masDev:
39+
entitlements: build/entitlements.mas.plist
40+
entitlementsInherit: build/entitlements.mas.inherit.plist
41+
provisioningProfile: assets/development.provisionprofile
42+
mas:
43+
entitlements: build/entitlements.mas.plist
44+
entitlementsInherit: build/entitlements.mas.inherit.plist
45+
provisioningProfile: assets/distribution.provisionprofile
46+
win:
47+
target:
48+
- zip
49+
- portable
50+
- nsis
51+
- appx
52+
icon: assets/icons/sleek.ico
53+
artifactName: ${productName}-${version}-win-${arch}.${ext}
54+
nsis:
55+
artifactName: ${productName}-${version}-win-${arch}-Setup.${ext}
56+
appx:
57+
displayName: sleek - todo.txt manager for Windows, free and open-source (FOSS)
58+
identityName: 17450RobinAhle.sleektodomanager
59+
publisher: CN=2B3D4037-FF2E-4C36-84A6-CFF49F585C0C
60+
publisherDisplayName: ransome1
61+
applicationId: RobinAhle.sleektodomanager
62+
linux:
63+
icon: assets/icons
64+
category: ProjectManagement
65+
target:
66+
- deb
67+
- freebsd
68+
- rpm
69+
- AppImage
70+
electronVersion: 34.0.0

electron.vite.config.ts

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

0 commit comments

Comments
 (0)