Skip to content

Commit

Permalink
refactor: move to electron-vite for build, clean up CI (#462)
Browse files Browse the repository at this point in the history
* initial commit

* fix: packaging

* fix: split settings into two to fix broken directory stuff

* chore: remove unneeded files

* chore: cleanup

* chore: cleanup

* fix: remove preload stuff

* ci: tweak pr workflows

* ci: try to fix cache

* build: re-add autoprefixer

* fix: rmdir

* chore: update some packages

* fix: track description not showing

* fix: toggle styling

* build: bump react-markdown to v8

* fix: license link font size

* build: fix generation of license file

* ci: tweaks

* refactor: change way third party licenses work

* fix: update vite and electron-vite to fix bundling issue

* chore: fix lint

* chore: fix package-lock.json

* fix: appdata
  • Loading branch information
Benjozork authored Aug 21, 2024
1 parent 29bf73c commit 573c529
Show file tree
Hide file tree
Showing 47 changed files with 15,883 additions and 30,529 deletions.
1 change: 0 additions & 1 deletion .babelrc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PR Title
name: PR Semantics
on:
pull_request_target:
types:
Expand Down
30 changes: 23 additions & 7 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,43 @@ on:
- master
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.9'
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}

- name: install dependencies
- name: Install dependencies
run: npm ci
- name: npm run lint
run: |
npm run lint
build:
name: Build and upload Installer
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.9'
- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Install system requirements
run: sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install -y --allow-downgrades libc6:i386 libgcc-s1:i386 libstdc++6:i386 && sudo apt-get install -y wine32 wine64
- name: lint
run: npm run lint
- name: build
- name: Build Installer
run: npm run package
- name: upload PR artifact
- name: Upload PR artifact
uses: actions/upload-artifact@v3
with:
name: FlyByWire_Installer_Setup
Expand Down
17 changes: 0 additions & 17 deletions electron-webpack.json

This file was deleted.

26 changes: 26 additions & 0 deletions electron.vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { defineConfig } from 'electron-vite';
import path from 'path';
import ViteYaml from '@modyfi/vite-plugin-yaml';
import renderer from 'vite-plugin-electron-renderer';

const baseOptions = {
resolve: {
alias: {
// TODO not need this (vite)
simplebar: path.resolve(__dirname, './node_modules/simplebar-react/'),
common: path.resolve(__dirname, './src/common/'),
renderer: path.resolve(__dirname, './src/renderer/'),
main: path.resolve(__dirname, './src/main/'),
},
},
};

export default defineConfig({
main: {
...baseOptions,
},
renderer: {
...baseOptions,
plugins: [ViteYaml(), renderer()],
},
});
Loading

0 comments on commit 573c529

Please sign in to comment.