Ver código fonte

[desktop] Fix yarn build

Manav Rathi 1 ano atrás
pai
commit
267ad0d11f

+ 9 - 3
desktop/.gitignore

@@ -1,12 +1,18 @@
 # Node
 # Node
 node_modules/
 node_modules/
 
 
-# electron-builder
-dist/
-
 # macOS
 # macOS
 .DS_Store
 .DS_Store
 
 
+# Editors
+.vscode/
+
 # Local env files
 # Local env files
 .env
 .env
 .env.*.local
 .env.*.local
+
+# tsc transpiles src/**/*.ts and emits the generated JS into app/
+app/
+
+# electron-builder
+dist/

+ 0 - 2
desktop/.prettierignore

@@ -1,3 +1 @@
 thirdparty/
 thirdparty/
-public/
-*.md

+ 2 - 2
desktop/README.md

@@ -14,7 +14,7 @@ To know more about Ente, see [our main README](../README.md) or visit
 >
 >
 > We moved a few things around when switching to a monorepo recently, so this
 > We moved a few things around when switching to a monorepo recently, so this
 > folder might not build with the instructions below. Hang tight, we're on it,
 > folder might not build with the instructions below. Hang tight, we're on it,
-> will fix things if.
+> and will fix.
 
 
 Fetch submodules
 Fetch submodules
 
 
@@ -31,7 +31,7 @@ yarn install
 Run the app
 Run the app
 
 
 ```sh
 ```sh
-yarn start
+yarn dev
 ```
 ```
 
 
 To recompile automatically using electron-reload, run this in a separate
 To recompile automatically using electron-reload, run this in a separate

+ 4 - 4
desktop/package.json

@@ -8,13 +8,13 @@
     "scripts": {
     "scripts": {
         "build": "yarn build-renderer && yarn build-main",
         "build": "yarn build-renderer && yarn build-main",
         "build-main": "yarn install && tsc",
         "build-main": "yarn install && tsc",
-        "build-renderer": "cd ui && yarn install && yarn export:photos",
+        "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",
         "postinstall": "electron-builder install-app-deps",
         "lint": "yarn prettier --check . && eslint \"src/**/*.{js,jsx,ts,tsx}\"",
         "lint": "yarn prettier --check . && eslint \"src/**/*.{js,jsx,ts,tsx}\"",
         "lint-fix": "yarn prettier --write . && eslint --fix .",
         "lint-fix": "yarn prettier --write . && eslint --fix .",
-        "start": "concurrently \"yarn start-main\" \"yarn start-renderer\"",
-        "start-main": "yarn build-main && electron app/main.js",
-        "start-renderer": "cd ui && yarn install && yarn dev:photos",
         "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"
     },
     },

+ 3 - 1
desktop/tsconfig.json

@@ -5,11 +5,13 @@
         "esModuleInterop": true,
         "esModuleInterop": true,
         "noImplicitAny": true,
         "noImplicitAny": true,
         "sourceMap": true,
         "sourceMap": true,
+        /* Emit the generated JS into app/ */
         "outDir": "app",
         "outDir": "app",
         "baseUrl": "src",
         "baseUrl": "src",
         "paths": {
         "paths": {
             "*": ["node_modules/*"]
             "*": ["node_modules/*"]
         }
         }
     },
     },
-    "include": ["src/**/*"]
+    /* transpile all ts files in src/ */
+    "include": ["src/**/*.ts"]
 }
 }

+ 8 - 5
web/.gitignore

@@ -1,14 +1,17 @@
 # Node
 # Node
 node_modules/
 node_modules/
 
 
-# Next.js
-.next/
-out/
-next-env.d.ts
-
 # macOS
 # macOS
 .DS_Store
 .DS_Store
 
 
+# Editors
+.vscode/
+
 # Local env files
 # Local env files
 .env
 .env
 .env.*.local
 .env.*.local
+
+# Next.js
+.next/
+out/
+next-env.d.ts