nxapi/src/app
2023-06-02 17:31:20 +01:00
..
browser Translate main_window:sidebar.discord_not_connected 2023-05-23 00:11:38 +01:00
common Add open hidden at login option for Windows and Linux 2022-11-12 17:22:57 +00:00
i18n Merge remote-tracking branch 'github/pull/54' into i18n 2023-06-02 00:14:28 +01:00
main Fix new window menu translation 2023-06-02 17:31:20 +01:00
preload Fix language detection 2023-01-29 12:43:58 +00:00
preload-webservice Add sendMessage, copyToClipboard and downloadImages web service functions 2022-10-26 16:35:46 +01:00
app-entry.cts Write debug logs 2023-06-01 18:45:31 +01:00
app-init.ts Write debug logs 2023-06-01 18:45:31 +01:00
README.md Move Electron app entrypoint, handle launch errors 2022-09-20 15:51:06 +01:00

Electron app

The Electron app is bundled into ~4 files in dist/app/bundle using Rollup. The main process code is not bundled for development, but is when packaging the app at dist/bundle (with the command line executable at dist/bundle/cli-bundle.js).

electron.ts exports all Electron APIs used in the main process. This is because the electron module doesn't actually exist - Electron patches the require function (but not the module importer). Additionally Electron does not support using a standard JavaScript module as the app entrypoint, so app-entry.cts (a CommonJS module) is used to import the actual app entrypoint after the ready event.

Electron APIs used in renderer processes should be imported directly from the electron module as they are always bundled into a CommonJS module.

Any files outside this directory must not depend on anything here, as this directory won't be included in the npm package.