Document some and fix the path

This commit is contained in:
Manav Rathi 2024-03-11 17:28:01 +05:30
parent 267ad0d11f
commit 849b61c5cf
5 changed files with 46 additions and 8 deletions

11
desktop/docs/README.md Normal file
View file

@ -0,0 +1,11 @@
# Developer docs
If you just want to run the Ente Photos desktop app locally or develop it, you
can do:
yarn install
yarn dev
The docs in this directory provide more details that some developers might find
useful. You might also find the developer docs for
[web](../../web/docs/README.md) useful.

View file

@ -0,0 +1,6 @@
# Dependencies
See [web/docs/dependencies.md](../../web/docs/dependencies.md) for general web
specific dependencies. See [electron.md](electron.md) for our main dependency,
Electron. The rest of this document describes the remaining, desktop specific
dependencies that are used by the Photos desktop app.

20
desktop/docs/electron.md Normal file
View file

@ -0,0 +1,20 @@
# Electron
[Electron](https://www.electronjs.org) is a cross-platform (Linux, Windows,
macOS) way for creating desktop apps using TypeScript.
Electron embeds Chromium and Node.js in the generated app's binary. The
generated app thus consists of two separate processes - the _main_ process, and
a _renderer_ process.
* The _renderer_ process is a regular web app that gets loaded into the embedded
Chromium. In our case, we build a static export of the [Photos web
app](../web/README.md) and bundle it in the generated app's binary - at
runtime, the embedded Chromium loads this.
* The _main_ process is runs the embedded Node.js. This code can deal with the
host OS - it is conceptually like a `node` repl running on your machine. In our
case, the TypeScript code (in the `src/` directory) gets transpiled by `tsc`
into JavaScript in the `app/` directory, which gets bundled in the generated
app's binary and is loaded by the `node` (main) process when it starts.
y

View file

@ -2,18 +2,18 @@
"name": "ente",
"version": "1.6.63",
"private": true,
"description": "Desktop client for ente.io",
"author": "ente <code@ente.io>",
"description": "Desktop client for Ente Photos",
"author": "Ente <code@ente.io>",
"main": "app/main.js",
"scripts": {
"build": "yarn build-renderer && yarn build-main",
"build-main": "yarn install && tsc",
"build-main": "tsc",
"build-renderer": "cd ../web && yarn install && yarn build:photos",
"dev": "concurrently \"yarn dev-main\" \"yarn dev-renderer\"",
"dev-main": "yarn build-main && electron app/main.js",
"dev-renderer": "cd ../web && yarn install && yarn dev:photos",
"postinstall": "electron-builder install-app-deps",
"lint": "yarn prettier --check . && eslint \"src/**/*.{js,jsx,ts,tsx}\"",
"lint": "yarn prettier --check . && eslint \"src/**/*.ts\"",
"lint-fix": "yarn prettier --write . && eslint --fix .",
"test-release": "cross-env IS_TEST_RELEASE=true yarn build && electron-builder --config.compression=store",
"watch": "tsc -w"
@ -131,7 +131,7 @@
"files": [
"app/**/*",
{
"from": "ui/apps/photos",
"from": "../web/apps/photos",
"to": "ui",
"filter": [
"!**/*",

View file

@ -1,8 +1,9 @@
# Developer docs
If you just want to run ente locally or develop on it, you can do
If you just want to run Ente's web apps locally or develop them, you can do
yarn
yarn install
yarn dev
The docs in this directory are for more advanced or infrequently needed details.
The docs in this directory provide more details that some developers might find
useful.