50 lines
1.2 KiB
JavaScript
50 lines
1.2 KiB
JavaScript
'use strict';
|
|
|
|
const targetDir = process.env.CARGO_TARGET_DIR || 'target';
|
|
const rustBinary =
|
|
process.platform === 'win32'
|
|
? `${targetDir}/release/ByteDraft.exe`
|
|
: `${targetDir}/release/ByteDraft`;
|
|
|
|
module.exports = {
|
|
packagerConfig: {
|
|
asar: true,
|
|
prune: true,
|
|
icon: 'electron/assets/icons/icon',
|
|
extraResource: ['ui/dist', rustBinary],
|
|
// Keep distributables lean: exclude source, build outputs, and CI metadata
|
|
// from the packaged app (Electron runtime + app code only).
|
|
ignore: [
|
|
/^\/\.git($|\/)/,
|
|
/^\/\.gitea($|\/)/,
|
|
/^\/\.act($|\/)/,
|
|
/^\/\.code-review-graph($|\/)/,
|
|
/^\/e2e($|\/)/,
|
|
/^\/crates($|\/)/,
|
|
/^\/target($|\/)/,
|
|
/^\/scripts($|\/)/,
|
|
/^\/test-results($|\/)/,
|
|
/^\/ui\/src($|\/)/,
|
|
/^\/ui\/tests($|\/)/,
|
|
/^\/ui\/node_modules($|\/)/,
|
|
],
|
|
},
|
|
makers: [
|
|
{
|
|
name: '@electron-forge/maker-squirrel',
|
|
config: {
|
|
authors: 'Frank Dudley',
|
|
description: 'ByteDraft — cross-platform text editor',
|
|
},
|
|
},
|
|
{
|
|
name: '@electron-forge/maker-dmg',
|
|
platforms: ['darwin'],
|
|
},
|
|
{
|
|
name: '@electron-forge/maker-zip',
|
|
platforms: ['darwin', 'linux'],
|
|
},
|
|
],
|
|
};
|