- Migrate from legacy .eslintrc.json to modern flat config system - Remove conflicting ESLint configuration files - Fix auto-generation of eslint.config.mjs by Nuxt - Update ESLint rules to use single quotes and proper formatting - Add comprehensive theme switching system with 24 palettes - Implement proper daisyUI theme integration - Add theme store with persistence and dark/light mode support - Create ThemeSwitcher component with enhanced UI - Fix package.json scripts to work with new ESLint flat config - Update VS Code settings for proper ESLint integration - Add changelogen scripts for proper changelog management BREAKING CHANGE: ESLint configuration migrated to flat config system
96 lines
3.1 KiB
TypeScript
96 lines
3.1 KiB
TypeScript
import { MakerDeb } from '@electron-forge/maker-deb'
|
|
import { MakerDMG } from '@electron-forge/maker-dmg'
|
|
import { MakerSquirrel } from '@electron-forge/maker-squirrel'
|
|
import { MakerZIP } from '@electron-forge/maker-zip'
|
|
import { AutoUnpackNativesPlugin } from '@electron-forge/plugin-auto-unpack-natives'
|
|
import { FusesPlugin } from '@electron-forge/plugin-fuses'
|
|
import { VitePlugin } from '@electron-forge/plugin-vite'
|
|
import { PublisherGithub } from '@electron-forge/publisher-github'
|
|
import type { ForgeConfig } from '@electron-forge/shared-types'
|
|
import { FuseV1Options, FuseVersion } from '@electron/fuses'
|
|
import setLanguages from 'electron-packager-languages'
|
|
import packageJSON from '../package.json'
|
|
|
|
export default {
|
|
packagerConfig: {
|
|
name: packageJSON.name,
|
|
appBundleId: 'com.bismillahdao.ziya',
|
|
appCategoryType: 'public.app-category.utilities',
|
|
appCopyright: `Copyright (C) ${new Date().getFullYear()} ${packageJSON.author.name}`,
|
|
icon: 'public/favicon',
|
|
asar: {
|
|
unpack: '**/node_modules/{sharp,@img}/**/*',
|
|
},
|
|
osxSign: {},
|
|
ignore: [
|
|
/^\/(?!node_modules|package\.json|.vite)/,
|
|
],
|
|
afterCopy: [setLanguages(['en', 'en-US', 'en-GB'])],
|
|
},
|
|
rebuildConfig: {
|
|
onlyModules: ['sharp'],
|
|
force: true,
|
|
},
|
|
makers: [
|
|
new MakerZIP({}),
|
|
// Windows
|
|
new MakerSquirrel({
|
|
usePackageJson: true,
|
|
iconUrl: 'https://raw.githubusercontent.com/rizilab/ziya/main/public/favicon.ico',
|
|
setupIcon: 'public/favicon.ico',
|
|
}),
|
|
// macOS
|
|
new MakerDMG({
|
|
overwrite: true,
|
|
format: 'ULFO',
|
|
icon: 'public/favicon.icns',
|
|
}),
|
|
// Linux
|
|
new MakerDeb({
|
|
options: {
|
|
categories: ['Utility'],
|
|
icon: 'public/favicon.png',
|
|
},
|
|
}),
|
|
],
|
|
plugins: [
|
|
new VitePlugin({
|
|
// `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc.
|
|
// If you are familiar with Vite configuration, it will look really familiar.
|
|
build: [
|
|
{
|
|
entry: 'electron/main.ts',
|
|
config: '.config/vite.forge.ts',
|
|
target: 'main',
|
|
},
|
|
{
|
|
entry: 'electron/preload.ts',
|
|
config: '.config/vite.forge.ts',
|
|
target: 'preload',
|
|
},
|
|
],
|
|
renderer: [], // Nuxt app is generated no need to specify renderer
|
|
}),
|
|
// Fuses are used to enable/disable various Electron functionality
|
|
// at package time, before code signing the application
|
|
new FusesPlugin({
|
|
version: FuseVersion.V1,
|
|
[FuseV1Options.RunAsNode]: false,
|
|
[FuseV1Options.EnableCookieEncryption]: true,
|
|
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
|
|
[FuseV1Options.EnableNodeCliInspectArguments]: false,
|
|
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
|
|
[FuseV1Options.OnlyLoadAppFromAsar]: true,
|
|
}),
|
|
new AutoUnpackNativesPlugin({}),
|
|
],
|
|
publishers: [
|
|
new PublisherGithub({
|
|
repository: {
|
|
owner: 'Rizary',
|
|
name: packageJSON.name,
|
|
},
|
|
prerelease: true,
|
|
}),
|
|
],
|
|
} satisfies ForgeConfig
|