Taskfile.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. version: '3'
  2. vars:
  3. APP_NAME: "腾图工具箱"
  4. BIN_DIR: "bin"
  5. PACKAGE_MANAGER: '{{.PACKAGE_MANAGER | default "npm"}}'
  6. VITE_PORT: '{{.WAILS_VITE_PORT | default 9245}}'
  7. # Target OS for build/package/run. Defaults to the host OS, and is overridden
  8. # by `wails3 build GOOS=...` (or the GOOS env var) for cross-compilation. The
  9. # tasks below dispatch to the matching platform Taskfile via this variable.
  10. GOOS: '{{.GOOS | default OS}}'
  11. includes:
  12. common: ./build/Taskfile.yml
  13. windows: ./build/windows/Taskfile.yml
  14. darwin: ./build/darwin/Taskfile.yml
  15. linux: ./build/linux/Taskfile.yml
  16. ios: ./build/ios/Taskfile.yml
  17. android: ./build/android/Taskfile.yml
  18. tasks:
  19. build:
  20. summary: Builds the application
  21. cmds:
  22. - task: "{{.GOOS}}:build"
  23. package:
  24. summary: Packages a production build of the application
  25. cmds:
  26. - task: "{{.GOOS}}:package"
  27. run:
  28. summary: Runs the application
  29. cmds:
  30. - task: "{{.GOOS}}:run"
  31. dev:
  32. summary: Runs the application in development mode
  33. cmds:
  34. - wails3 dev -config ./build/config.yml -port {{.VITE_PORT}}
  35. install:msix:tools:
  36. summary: Installs tools required for Windows MSIX packaging
  37. cmds:
  38. - task: windows:install:msix:tools
  39. setup:docker:
  40. summary: Builds Docker image for cross-compilation (~800MB download)
  41. cmds:
  42. - task: common:setup:docker
  43. build:server:
  44. summary: Builds the application in server mode (no GUI, HTTP server only)
  45. cmds:
  46. - task: common:build:server
  47. run:server:
  48. summary: Runs the application in server mode
  49. cmds:
  50. - task: common:run:server
  51. build:docker:
  52. summary: Builds a Docker image for server mode deployment
  53. cmds:
  54. - task: common:build:docker
  55. run:docker:
  56. summary: Builds and runs the Docker image
  57. cmds:
  58. - task: common:run:docker