Skip to content

Commit 67f0746

Browse files
authored
refactor: tauri folder (#1738)
1 parent d2db49e commit 67f0746

File tree

28 files changed

+52
-43
lines changed

28 files changed

+52
-43
lines changed

frontend/.vscode/launch.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,18 @@
9292
"cwd": "${workspaceRoot}/app_flowy"
9393
},
9494
{
95+
// https://tauri.app/v1/guides/debugging/vs-code
9596
"type": "lldb",
9697
"request": "launch",
97-
"name": "AF-tauri: Dev",
98+
"name": "AF-tauri: Debug backend",
9899
"cargo": {
99100
"args": [
100101
"build",
101102
"--manifest-path=./appflowy_tauri/src-tauri/Cargo.toml",
102103
"--no-default-features"
103104
]
104105
},
105-
"preLaunchTask": "AF: Tauri Dev",
106+
"preLaunchTask": "AF: Tauri UI Dev",
106107
"cwd": "${workspaceRoot}/appflowy_tauri/"
107108
},
108109
{

frontend/.vscode/tasks.json

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"AF: Flutter Pub Get",
2121
"AF: Flutter Package Get",
2222
"AF: Generate Language Files",
23-
"AF: Generate Freezed Files",
23+
"AF: Generate Freezed Files"
2424
],
2525
"presentation": {
2626
"reveal": "always",
@@ -38,12 +38,12 @@
3838
"AF: Flutter Pub Get",
3939
"AF: Flutter Package Get",
4040
"AF: Generate Language Files",
41-
"AF: Generate Freezed Files",
41+
"AF: Generate Freezed Files"
4242
],
4343
"presentation": {
4444
"reveal": "always",
45-
"panel": "new",
46-
},
45+
"panel": "new"
46+
}
4747
},
4848
{
4949
"label": "AF: build_flowy_sdk_for_android",
@@ -187,11 +187,20 @@
187187
"detail": "app_flowy"
188188
},
189189
{
190-
"label": "AF: Tauri Dev",
190+
"label": "AF: Tauri UI Dev",
191191
"type": "shell",
192192
"isBackground": true,
193-
"command": "npm run dev",
194-
"problemMatcher": [],
193+
"command": "yarn dev",
194+
"problemMatcher": ["$tsc"],
195+
"options": {
196+
"cwd": "${workspaceFolder}/appflowy_tauri"
197+
}
198+
},
199+
{
200+
"label": "AF: Tauri Dev",
201+
"type": "shell",
202+
"command": "npm run tauri dev",
203+
"problemMatcher": ["$tsc"],
195204
"options": {
196205
"cwd": "${workspaceFolder}/appflowy_tauri"
197206
}
@@ -202,7 +211,20 @@
202211
"command": "cargo make tauri_clean",
203212
"options": {
204213
"cwd": "${workspaceFolder}"
205-
}
214+
},
215+
"problemMatcher": ["$tsc"],
206216
},
217+
{
218+
"label": "AF: Tauri Clean + Dev",
219+
"type": "shell",
220+
"dependsOrder": "sequence",
221+
"dependsOn": [
222+
"AF: Tauri Clean",
223+
"AF: Tauri UI Dev"
224+
],
225+
"options": {
226+
"cwd": "${workspaceFolder}"
227+
}
228+
}
207229
]
208230
}

frontend/Makefile.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ CRATE_TYPE = "staticlib"
4444
LIB_EXT = "a"
4545
APP_ENVIRONMENT = "local"
4646
FLUTTER_FLOWY_SDK_PATH = "app_flowy/packages/appflowy_backend"
47-
TAURI_PROTOBUF_PATH = "appflowy_tauri/src/protobuf"
47+
TAURI_BACKEND_SERVICE_PATH = "appflowy_tauri/src/services/backend"
4848
# Test default config
4949
TEST_CRATE_TYPE = "cdylib"
5050
TEST_LIB_EXT = "dylib"

frontend/appflowy_tauri/.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ dist-ssr
2323
*.sln
2424
*.sw?
2525

26-
**/src/protobuf/classes/
27-
**/src/protobuf/events/
26+
**/src/services/backend/classes/
27+
**/src/services/backend/events/
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
use std::env;
21
fn main() {
3-
env::set_var("TAURI_PROTOBUF_PATH", "appflowy_tauri/src/protobuf");
4-
env::set_var("CARGO_MAKE_WORKING_DIRECTORY", "../../../");
5-
62
tauri_build::build()
73
}

frontend/appflowy_tauri/src/App.tsx renamed to frontend/appflowy_tauri/src/appflowy_app/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import "./App.css";
22
import {
33
UserEventSignIn,
44
SignInPayloadPB,
5-
} from "./protobuf/events/flowy-user";
5+
} from "../services/backend/events/flowy-user";
66
import { nanoid } from "nanoid";
77

88

0 commit comments

Comments
 (0)