tauri.toml 1.3 KB

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