tauri.toml 1.3 KB

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