2024-03-13 11:26:12 +00:00
|
|
|
# Development
|
2024-03-12 11:01:16 +00:00
|
|
|
|
2024-03-13 11:26:12 +00:00
|
|
|
## Yarn commands
|
2024-03-13 11:08:45 +00:00
|
|
|
|
2024-03-13 11:26:12 +00:00
|
|
|
### yarn dev
|
2024-03-13 11:08:45 +00:00
|
|
|
|
2024-03-22 14:25:57 +00:00
|
|
|
Launch the app in development mode:
|
2024-03-13 11:26:12 +00:00
|
|
|
|
2024-03-22 14:25:57 +00:00
|
|
|
- Transpiles the files in `src/` and starts the main process.
|
2024-03-13 11:26:12 +00:00
|
|
|
|
2024-03-26 14:51:36 +00:00
|
|
|
- Runs a development server for the renderer, with hot module reload.
|
2024-03-13 11:26:12 +00:00
|
|
|
|
|
|
|
### yarn build
|
|
|
|
|
|
|
|
Build a binary for your current platform.
|
|
|
|
|
|
|
|
Note that our actual releases use a
|
|
|
|
[GitHub workflow](../.github/workflows/desktop-release.yml) that is similar to
|
|
|
|
this, except it builds binaries for all the supported OSes and uses production
|
|
|
|
signing credentials.
|
|
|
|
|
|
|
|
During development, you might find `yarn build:quick` helpful. It is a variant
|
|
|
|
of `yarn build` that omits some steps to build a binary quicker, something that
|
|
|
|
can be useful during development.
|
|
|
|
|
2024-03-15 09:26:24 +00:00
|
|
|
### postinstall
|
2024-03-13 11:26:12 +00:00
|
|
|
|
|
|
|
When using native node modules (those written in C/C++), we need to ensure they
|
|
|
|
are built against `electron`'s packaged `node` version. We use
|
|
|
|
[electron-builder](https://www.electron.build/cli)'s `install-app-deps` command
|
|
|
|
to rebuild those modules automatically after each `yarn install` by invoking it
|
|
|
|
in as the `postinstall` step in our package.json.
|
|
|
|
|
2024-03-30 12:23:01 +00:00
|
|
|
### lint, lint-fix
|
2024-03-13 11:26:12 +00:00
|
|
|
|
|
|
|
Use `yarn lint` to check that your code formatting is as expected, and that
|
|
|
|
there are no linter errors. Use `yarn lint-fix` to try and automatically fix the
|
|
|
|
issues.
|