Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move to electron-vite for build, clean up CI #462

Merged
merged 24 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading