mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 13:29:02 +08:00
fix: ignore some files to be bundled (#3770)
(cherry picked from commit 61ffc4220c)
This commit is contained in:
@@ -130,6 +130,7 @@ module.exports = {
|
|||||||
: undefined,
|
: undefined,
|
||||||
// We need the following line for updater
|
// We need the following line for updater
|
||||||
extraResource: ['./resources/app-update.yml'],
|
extraResource: ['./resources/app-update.yml'],
|
||||||
|
ignore: ['src', 'e2e', 'tests'],
|
||||||
},
|
},
|
||||||
makers,
|
makers,
|
||||||
hooks: {
|
hooks: {
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
/* eslint-disable no-async-promise-executor */
|
/* eslint-disable no-async-promise-executor */
|
||||||
import { spawn } from 'node:child_process';
|
import { spawn } from 'node:child_process';
|
||||||
import { readFileSync } from 'node:fs';
|
|
||||||
import path from 'node:path';
|
|
||||||
|
|
||||||
import electronPath from 'electron';
|
import electronPath from 'electron';
|
||||||
import * as esbuild from 'esbuild';
|
import * as esbuild from 'esbuild';
|
||||||
|
|
||||||
import { config, electronDir } from './common.mjs';
|
import { config } from './common.mjs';
|
||||||
|
|
||||||
// this means we don't spawn electron windows, mainly for testing
|
// this means we don't spawn electron windows, mainly for testing
|
||||||
const watchMode = process.argv.includes('--watch');
|
const watchMode = process.argv.includes('--watch');
|
||||||
@@ -19,20 +17,6 @@ const stderrFilterPatterns = [
|
|||||||
/ExtensionLoadWarning/,
|
/ExtensionLoadWarning/,
|
||||||
];
|
];
|
||||||
|
|
||||||
// these are set before calling `config`, so we have a chance to override them
|
|
||||||
try {
|
|
||||||
const devJson = readFileSync(
|
|
||||||
path.resolve(electronDir, './dev.json'),
|
|
||||||
'utf-8'
|
|
||||||
);
|
|
||||||
const devEnv = JSON.parse(devJson);
|
|
||||||
Object.assign(process.env, devEnv);
|
|
||||||
} catch (err) {
|
|
||||||
console.warn(
|
|
||||||
`Could not read dev.json. Some functions may not work as expected.`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @type {ChildProcessWithoutNullStreams | null} */
|
/** @type {ChildProcessWithoutNullStreams | null} */
|
||||||
let spawnProcess = null;
|
let spawnProcess = null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user