melos.yaml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. name: YYHotel-Business-ER
  2. packages:
  3. - "app/"
  4. - "packages/cs_domain/"
  5. - "packages/cs_resources/"
  6. - "packages/cs_router/"
  7. - "packages/cs_shared/"
  8. - "packages/cs_widgets/"
  9. - "packages/cs_plugin_basic/"
  10. - "packages/cs_plugin_platform/"
  11. - "packages/cs_initializer/"
  12. - "packages/cpt_auth/"
  13. - "packages/cpt_job/"
  14. - "packages/cpt_job_sg/"
  15. - "packages/cpt_labour/"
  16. - "packages/cpt_labour_sg/"
  17. - "packages/cpt_report/"
  18. command:
  19. bootstrap:
  20. usePubspecOverrides: true
  21. scripts:
  22. analyze:
  23. run: melos exec -- "flutter analyze"
  24. description: Run `flutter analyze` in all packages
  25. pub_get_all:
  26. run: dart pub global run melos exec --flutter "flutter pub get"
  27. description: 在每个子组件中运行 flutter pub get,用来获取和安装这些包的所有依赖
  28. build_all:
  29. run: dart pub global run melos exec --depends-on="build_runner" "flutter packages pub run build_runner build --delete-conflicting-outputs"
  30. description: 依赖了 build_runner 的组件执行 build_runner build 命令,用于自动生成JSON序列化、Freezed类等
  31. clean_all:
  32. run: melos exec -- "flutter clean"
  33. description: Run `flutter clean` in all packages
  34. clean_app:
  35. run: cd "$MELOS_ROOT_PATH/app" && flutter clean
  36. description: Run `flutter clean` in app module
  37. run_app:
  38. run: cd "$MELOS_ROOT_PATH/app" && flutter run
  39. description: 运行App模块.
  40. run_app2:
  41. run: melos exec --scope="app" -- "flutter run"
  42. description: 运行App模块方式2.
  43. build_apk:
  44. run: cd "$MELOS_ROOT_PATH/app" && flutter build apk
  45. description: 编译安卓Release的APK格式安装包.
  46. resource_get:
  47. run: |
  48. cd "$MELOS_ROOT_PATH/packages/cs_domain/" && flutter pub get
  49. melos exec --scope="cs_resources" -- "flutter pub get"
  50. cd "$MELOS_ROOT_PATH/packages/cs_widgets/" && flutter pub get
  51. description: 更新实体和资源模块
  52. format:
  53. run: melos exec -- "flutter format . --set-exit-if-changed"
  54. description: Run `flutter format .` in all packages
  55. test:
  56. run: melos exec --dir-exists=test -- "flutter test"
  57. description: Run `flutter test` in all packages