AFFiNE/apps/electron
2023-06-05 01:00:41 +08:00
..
layers feat: plugin system with isolated bundles (#2660) 2023-06-02 16:28:47 +08:00
resources fix: replace windows installer loading gif (#2575) 2023-05-29 21:36:08 +08:00
scripts refactor: use esbuild instead of vite (#2672) 2023-06-02 13:22:09 +00:00
tests build: perform TypeCheck for all packages (#2573) 2023-05-31 12:49:56 +00:00
types feat: electron app (#1586) 2023-03-16 22:58:21 +08:00
.gitignore feat: support google cloud login in client (#1822) 2023-04-11 18:42:36 +00:00
dev-app-update.yml feat: implement latest version updater for macos (#2214) 2023-05-08 13:21:15 -05:00
forge.config.js fix: add windows install loading gif (#2462) 2023-05-21 16:03:48 +08:00
package.json chore: bump version (#2681) 2023-06-05 01:00:41 +08:00
playwright.config.ts test: add electron test (#1840) 2023-04-24 18:53:36 -05:00
README.md docs: add native build command to readme (#2535) 2023-05-26 10:29:30 +08:00
tsconfig.json build: prevent tsconfig includes sources outside (#2643) 2023-06-01 17:08:14 +08:00
tsconfig.node.json build: perform TypeCheck for all packages (#2573) 2023-05-31 12:49:56 +00:00

AFFiNE Electron App

Development

To run AFFiNE Desktop Client Application locally, run the following commands:

# in repo root
yarn install
yarn workspace @affine/native build
yarn dev

# in apps/electron
yarn generate-assets
yarn dev # or yarn prod for production build

Troubleshooting

better-sqlite3 error

When running tests or starting electron, you may encounter the following error:

Error: The module 'apps/electron/node_modules/better-sqlite3/build/Release/better_sqlite3.node'

This is due to the fact that the better-sqlite3 package is built for the Node.js version in Electron & in your machine. To fix this, run the following command based on different cases:

# for running unit tests, we are not using Electron's node:
yarn rebuild better-sqlite3

# for running Electron, we are using Electron's node:
yarn postinstall

Credits

Most of the boilerplate code is generously borrowed from the following