version: "0.5"

processes:
  # App Dev

  clan-app-ui:
    namespace: "app"
    command: |
      cd $(git rev-parse --show-toplevel)/pkgs/clan-app/ui-2d
      npm install
      vite
    ready_log_line: "VITE"

  clan-app:
    namespace: "app"
    command: |
      cd $(git rev-parse --show-toplevel)/pkgs/clan-app
      ./bin/clan-app --debug --content-uri http://localhost:3000
    depends_on:
      clan-app-ui:
        condition: "process_log_ready"
    is_foreground: true
    ready_log_line: "Debug mode enabled"

  # Storybook Dev

  storybook:
    namespace: "storybook"
    command: |
      cd $(git rev-parse --show-toplevel)/pkgs/clan-app/ui-2d
      npm run storybook-dev -- --ci
    ready_log_line: "started"

  luakit:
    namespace: "storybook"
    command: "luakit http://localhost:6006"
    depends_on:
      storybook:
        condition: "process_log_ready"
