Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Quicker quick

Manav Rathi04b99664255e
diff --git a/desktop/docs/dev.md b/desktop/docs/dev.md
index a0471d87ca..1e7d65cdfd 100644
--- a/desktop/docs/dev.md
+++ b/desktop/docs/dev.md
@@ -1,12 +1,41 @@
-# Development tips
+# Development
-- `yarn build:quick` is a variant of `yarn build` that uses the
- `--config.compression=store` flag to (slightly) speed up electron-builder.
+## Yarn commands
-## Notes
+### yarn dev
-- 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 `preinstall` step in our package.json.
+Launch the app in development mode
+
+- Runs a development server for the renderer, with HMR.
+
+- Starts tsc in watch mode to recompile the JS files used by the main process.
+
+- Starts the main process, reloading it on changes to the the TS files in
+ `src/`.
+
+### 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.
+
+## postinstall
+
+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.
+
+## lint and lint-fix
+
+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.
diff --git a/desktop/package.json b/desktop/package.json
index 8d90fca6e6..69f9d7dcea 100644
--- a/desktop/package.json
+++ b/desktop/package.json
@@ -8,7 +8,7 @@
"scripts": {
"build": "yarn build-renderer && yarn build-main",
"build-main": "tsc && electron-builder",
- "build-main:quick": "tsc && electron-builder --config.compression=store",
+ "build-main:quick": "tsc && electron-builder --dir --config.compression=store --config.mac.identity=null",
"build-renderer": "cd ../web && yarn install && yarn build:photos && cd ../desktop && rm -f out && ln -sf ../web/apps/photos/out",
"build:quick": "yarn build-renderer && yarn build-main:quick",
"dev": "concurrently --names 'main,rndr,tscw' \"yarn dev-main\" \"yarn dev-renderer\" \"yarn dev-main-watch\"",
diff --git a/desktop/yarn.lock b/desktop/yarn.lock
index c8080d23fd..1ac02a5dca 100644
--- a/desktop/yarn.lock
+++ b/desktop/yarn.lock
@@ -2441,7 +2441,7 @@ natural-compare@^1.4.0:
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==
-next-electron-server@^1.0.0:
+next-electron-server@^1:
version "1.0.0"
resolved "https://registry.yarnpkg.com/next-electron-server/-/next-electron-server-1.0.0.tgz#03e133ed64a5ef671b6c6409f908c4901b1828cb"
integrity sha512-fTUaHwT0Jry2fbdUSIkAiIqgDAInI5BJFF4/j90/okvZCYlyx6yxpXB30KpzmOG6TN/ESwyvsFJVvS2WHT8PAA==