tauri.toml 1.2 KB

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