浏览代码

chore: add code gen introductions

nathan 3 年之前
父节点
当前提交
4bcc05fc8a
共有 2 个文件被更改,包括 38 次插入16 次删除
  1. 4 12
      frontend/app_flowy/.vscode/launch.json
  2. 34 4
      frontend/app_flowy/.vscode/tasks.json

+ 4 - 12
frontend/app_flowy/.vscode/launch.json

@@ -10,8 +10,8 @@
             "program": "${workspaceRoot}/lib/main.dart",
             "type": "dart",
             "preLaunchTask": "build_flowy_sdk",
-            "env":{
-                "RUST_LOG":"debug"
+            "env": {
+                "RUST_LOG": "debug"
             },
             "cwd": "${workspaceRoot}"
         },
@@ -21,8 +21,8 @@
             "program": "${workspaceRoot}/lib/main.dart",
             "type": "dart",
             "preLaunchTask": "build_flowy_sdk",
-            "env":{
-                "RUST_LOG":"trace"
+            "env": {
+                "RUST_LOG": "trace"
             },
             "cwd": "${workspaceRoot}"
         },
@@ -32,13 +32,5 @@
             "type": "dart",
             "flutterMode": "profile"
         },
-        {
-            "name": "Generate Language Files",
-            "request": "launch",
-            "program": "${workspaceRoot}/lib/main.dart",
-            "type": "dart",
-            "preLaunchTask": "Generate Language Files",
-            "cwd": "${workspaceRoot}"
-        },
     ]
 }

+ 34 - 4
frontend/app_flowy/.vscode/tasks.json

@@ -50,6 +50,40 @@
 			//     "$rustc"
 			// ],
 		},
+		{
+			"label": "Code Gen",
+			"type": "shell",
+			"dependsOn": [
+				"Flutter Pub",
+				"Flutter Package Get",
+				"Generate Language Files",
+				"Generate Freezed Files"
+			],
+			"group": {
+				"kind": "build",
+				"isDefault": true,
+			},
+			"dependsOrder": "sequence",
+			"presentation": {
+				"reveal": "always",
+				"panel": "new"
+			},
+		},
+		{
+			"label": "Flutter Pub",
+			"type": "shell",
+			"command": "flutter pub get",
+		},
+		{
+			"label": "Flutter Package Get",
+			"type": "shell",
+			"command": "flutter packages pub get",
+		},
+		{
+			"label": "Generate Freezed Files",
+			"type": "shell",
+			"command": "flutter pub run build_runner build --delete-conflicting-outputs",
+		},
 		{
 			"label": "Generate Language Files",
 			"type": "shell",
@@ -87,10 +121,6 @@
 					}
 				}
 			},
-			"group": {
-				"kind": "build",
-				"isDefault": true,
-			},
 			"options": {
 				"cwd": "${workspaceFolder}/../"
 			},