소스 검색

Document some and fix the path

Manav Rathi 1 년 전
부모
커밋
849b61c5cf
5개의 변경된 파일46개의 추가작업 그리고 8개의 파일을 삭제
  1. 11 0
      desktop/docs/README.md
  2. 6 0
      desktop/docs/dependencies.md
  3. 20 0
      desktop/docs/electron.md
  4. 5 5
      desktop/package.json
  5. 4 3
      web/docs/README.md

+ 11 - 0
desktop/docs/README.md

@@ -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.

+ 6 - 0
desktop/docs/dependencies.md

@@ -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 - 0
desktop/docs/electron.md

@@ -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

+ 5 - 5
desktop/package.json

@@ -2,18 +2,18 @@
     "name": "ente",
     "name": "ente",
     "version": "1.6.63",
     "version": "1.6.63",
     "private": true,
     "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",
     "main": "app/main.js",
     "scripts": {
     "scripts": {
         "build": "yarn build-renderer && yarn build-main",
         "build": "yarn build-renderer && yarn build-main",
-        "build-main": "yarn install && tsc",
+        "build-main": "tsc",
         "build-renderer": "cd ../web && yarn install && yarn build:photos",
         "build-renderer": "cd ../web && yarn install && yarn build:photos",
         "dev": "concurrently \"yarn dev-main\" \"yarn dev-renderer\"",
         "dev": "concurrently \"yarn dev-main\" \"yarn dev-renderer\"",
         "dev-main": "yarn build-main && electron app/main.js",
         "dev-main": "yarn build-main && electron app/main.js",
         "dev-renderer": "cd ../web && yarn install && yarn dev:photos",
         "dev-renderer": "cd ../web && yarn install && yarn dev:photos",
         "postinstall": "electron-builder install-app-deps",
         "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 .",
         "lint-fix": "yarn prettier --write . && eslint --fix .",
         "test-release": "cross-env IS_TEST_RELEASE=true yarn build && electron-builder --config.compression=store",
         "test-release": "cross-env IS_TEST_RELEASE=true yarn build && electron-builder --config.compression=store",
         "watch": "tsc -w"
         "watch": "tsc -w"
@@ -131,7 +131,7 @@
         "files": [
         "files": [
             "app/**/*",
             "app/**/*",
             {
             {
-                "from": "ui/apps/photos",
+                "from": "../web/apps/photos",
                 "to": "ui",
                 "to": "ui",
                 "filter": [
                 "filter": [
                     "!**/*",
                     "!**/*",

+ 4 - 3
web/docs/README.md

@@ -1,8 +1,9 @@
 # Developer docs
 # 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
     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.