2023-03-16 17:58:21 +03:00
|
|
|
# AFFiNE Electron App
|
|
|
|
|
|
|
|
## Development
|
|
|
|
|
2023-04-14 16:01:31 +03:00
|
|
|
To run AFFiNE Desktop Client Application locally, run the following commands:
|
2023-03-16 17:58:21 +03:00
|
|
|
|
2023-04-14 16:01:31 +03:00
|
|
|
```sh
|
|
|
|
# in repo root
|
|
|
|
yarn install
|
2023-05-26 05:29:30 +03:00
|
|
|
yarn workspace @affine/native build
|
2023-03-27 09:59:36 +03:00
|
|
|
yarn dev
|
2023-04-14 16:01:31 +03:00
|
|
|
|
2024-09-12 10:42:57 +03:00
|
|
|
# in packages/frontend/apps/electron
|
2023-04-14 16:01:31 +03:00
|
|
|
yarn generate-assets
|
|
|
|
yarn dev # or yarn prod for production build
|
2023-03-16 17:58:21 +03:00
|
|
|
```
|
|
|
|
|
2023-04-24 20:53:21 +03:00
|
|
|
## Troubleshooting
|
|
|
|
|
2024-09-05 08:39:01 +03:00
|
|
|
If you have trouble building electron during `yarn install`, try setting mirror environment variable:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
export ELECTRON_MIRROR="https://registry.npmmirror.com/-/binary/electron/"
|
|
|
|
```
|
|
|
|
|
2023-03-16 17:58:21 +03:00
|
|
|
## Credits
|
|
|
|
|
|
|
|
Most of the boilerplate code is generously borrowed from the following
|
|
|
|
|
|
|
|
- [vite-electron-builder](https://github.com/cawa-93/vite-electron-builder)
|
|
|
|
- [Turborepo basic example](https://github.com/vercel/turborepo/tree/main/examples/basic)
|
|
|
|
- [yerba](https://github.com/t3dotgg/yerba)
|