diff --git a/frontend/scripts/makefile/tool.toml b/frontend/scripts/makefile/tool.toml index f18bb8faa4..08e5de3c49 100644 --- a/frontend/scripts/makefile/tool.toml +++ b/frontend/scripts/makefile/tool.toml @@ -43,7 +43,7 @@ run_task = { name = "remove_files_with_pattern" } #Dart Clean [tasks.rm_dart_generated_files] env = { "dart_flowy_sdk_path" = "./app_flowy/packages/flowy_sdk/" } -run_task = { name = ["rm_dart_generated_protobuf_files"] } +run_task = { name = ["rm_dart_generated_protobuf_files", "rm_dart_generated_event_files"] } [tasks.rm_dart_generated_protobuf_files] private = true @@ -63,6 +63,24 @@ script = [ script_runner = "@duckscript" +[tasks.rm_dart_generated_event_files] +private = true +script = [ + """ + dart_event_folder = glob_array ${dart_flowy_sdk_path}/lib/dispatch/dart_event + + if not array_is_empty ${dart_event_folder} + echo Remove generated dart event files: + for path in ${dart_event_folder} + echo remove ${path} + rm -rf ${path} + end + end + """, +] +script_runner = "@duckscript" + + [tasks.remove_files_with_pattern] private = true script = [