tauri.toml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. [tasks.tauri_build]
  2. description = "Build the Tauri backend & Run Code Generation"
  3. script = ["""
  4. cd appflowy_tauri/src-tauri
  5. cargo build
  6. """]
  7. script_runner = "@shell"
  8. [tasks.tauri_dev]
  9. script = ["""
  10. cd appflowy_tauri
  11. npm run tauri dev
  12. """]
  13. script_runner = "@shell"
  14. [tasks.tauri_clean]
  15. description = "Remove all the building artifacts"
  16. run_task = { name = [
  17. "rust_lib_clean",
  18. "rm_macro_build_cache",
  19. "rm_rust_generated_files",
  20. "rm_tauri_generated_protobuf_files",
  21. "rm_tauri_generated_event_files",
  22. ] }
  23. [tasks.rm_tauri_generated_protobuf_files]
  24. private = true
  25. script = ["""
  26. protobuf_file_paths = glob_array ${TAURI_BACKEND_SERVICE_PATH}/classes
  27. if not array_is_empty ${protobuf_file_paths}
  28. echo Remove generated protobuf files:
  29. for path in ${protobuf_file_paths}
  30. echo remove ${path}
  31. rm -rf ${path}
  32. end
  33. end
  34. """]
  35. script_runner = "@duckscript"
  36. [tasks.rm_tauri_generated_event_files]
  37. private = true
  38. script = ["""
  39. event_file_paths = glob_array ${TAURI_BACKEND_SERVICE_PATH}/events
  40. if not array_is_empty ${event_file_paths}
  41. echo Remove generated protobuf files:
  42. for path in ${event_file_paths}
  43. echo remove ${path}
  44. rm -rf ${path}
  45. end
  46. end
  47. """]
  48. script_runner = "@duckscript"