Skip to content

Commit

Permalink
chore: migrate to vite
Browse files Browse the repository at this point in the history
  • Loading branch information
will-stone committed Dec 26, 2023
1 parent 7eb681f commit da2f520
Show file tree
Hide file tree
Showing 74 changed files with 1,521 additions and 1,294 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DS_Store
node_modules
out
.webpack
.env
.idea
.idea
.vite
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
66 changes: 66 additions & 0 deletions forge.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// @ts-check

import { MakerZIP } from '@electron-forge/maker-zip'
import { VitePlugin } from '@electron-forge/plugin-vite'

/** @type {import('@electron-forge/shared-types').ForgeConfig} */
const config = {
makers: [new MakerZIP({}, ['darwin'])],
packagerConfig: {
appBundleId: 'com.browserosaurus',
appCategoryType: 'public.app-category.developer-tools',
asar: false,
extendInfo: 'plist/Info.plist',
icon: 'src/shared/static/icon/icon.icns',
osxNotarize: process.env.CI
? undefined
: {
keychain: '~/Library/Keychains/login.keychain-db',
keychainProfile: 'AC_PASSWORD',
},
osxSign: process.env.CI
? undefined
: {
optionsForFile: () => ({
'entitlements': 'plist/entitlements.mac.plist',
'hardened-runtime': true,
}),
},
protocols: [
{
name: 'HTTP link',
schemes: ['http', 'https'],
},
{
name: 'File',
schemes: ['file'],
},
],
},
plugins: [
new VitePlugin({
build: [
{
config: 'vite.main.config.ts',
entry: 'src/main/main.ts',
},
{
config: 'vite.preload.config.ts',
entry: 'src/renderers/shared/preload.ts',
},
],
renderer: [
{
config: 'vite.renderer.prefs.config.ts',
name: 'prefs_window',
},
{
config: 'vite.renderer.picker.config.ts',
name: 'picker_window',
},
],
}),
],
}

export default config
76 changes: 0 additions & 76 deletions forge.config.ts

This file was deleted.

1 change: 1 addition & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const config: Config.InitialOptions = {
'\\.(css|less)$': '<rootDir>/__mocks__/style-mock.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/__mocks__/file-mock.js',
'^(\\.{1,2}/.*)\\.js$': '$1',
},
modulePathIgnorePatterns: ['<rootDir>/out/'],
preset: 'ts-jest',
Expand Down
Loading

0 comments on commit da2f520

Please sign in to comment.