aboutsummaryrefslogtreecommitdiffstats
path: root/.electron-builder.config.cjs
Commit message (Collapse)AuthorAge
* refactor: electron-builder configLibravatar Kristóf Marussy2022-05-16
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat: use wayland when availableLibravatar Kristóf Marussy2022-05-16
| | | | | | | | | | Auto-detect wayland in the yarn watch script. We use a shell script wrapper to launch sophie with wayland-specific arguments whenever appropriate. Because of this, the electron binary that ships with sophie has been renamed to sophie-bin. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat(service-preload): Embed service-injectLibravatar Kristóf Marussy2022-05-16
| | | | | | | | Embed the service-inject script into the service-preload script to avoid having to load it manually and reduce IPC communication when a service loads. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat(main): Add localization supportLibravatar Kristóf Marussy2022-05-16
| | | | | | | | | | | | | | | | Add i18next with a custom backend to the main process to load localization from file. Missing localizations are written to a missing localizations file in debug mode, but silently fall back in production mode. We will also need to add a custom backend for the renderer process that communicates with the main process. (i18next-fs-electron-backend is not applicable here, because we need localizations both in the main and renderer processes.) Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: Add eslint-plugin-unicornLibravatar Kristóf Marussy2022-01-09
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: Add prettierLibravatar Kristóf Marussy2022-01-09
| | | | | | | eslint will also enforce prettier rules, so there is no need to call prettier separately in CI. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* Turn off 'FuseV1Options.EnableEmbeddedAsarIntegrityValidation' since the ↵Libravatar Vijay A2022-01-02
| | | | | | packaged app doesn't start up on macos Signed-off-by: Vijay A <vraravam@users.noreply.github.com>
* build: Fully switch over to ESMLibravatar Kristóf Marussy2021-12-30
Now we can run with ESM at build and test time and transpile into commonjs for electron. This greatly simplifies testing, since we treat everything as ESM during build with esbuild anyways. Now the test environment and the build scripts match the apparent (but not the actual for the main, preload, and inject modules) runtime environment. Caveats: - We may use top-level async expressions in tests and script, but not in code that gets transpiled into commonjs or scripts that get imported by vite. The limitation w.r.t. commonjs seems fundamental. - Jest only experimentally supports ESM and there are some limitations with mocking. Most limitations (except the lack of automatic mocks) can be worked around by async importing code that uses mocks. - There are packages marked as modules (so that node reads any scripts in them as ESM) that nevertheless get transpiled into commonjs modules. However, these should be clearly marked by using a .cjs extension as their bundle. The worst offender is the root package, which has a .cjs as its main entry point that gets read by electron, but is in fact marked as a module. This doesn't seem to bother electron at all. The service-inject package is an IIFE with a .js extension, but it outputs a fully self-contained bundle, so the choice of module format should be irrelevant.