#!/usr/bin/env bash

set -euo pipefail

build_all() {
  local ZRNWV_ROOT=$(readlink -f $(dirname "${BASH_SOURCE[0]}")/../..)
  local THREE_ZRN_ROOT=$ZRNWV_ROOT/three_zrn
  local ESLINT_PLUGIN_ZRN=$ZRNWV_ROOT/eslint-plugin-zrn

  . $ZRNWV_ROOT/scripts/install_yarn.sh
  install_yarn

  . $ESLINT_PLUGIN_ZRN/scripts/commands.sh
  build

  . $ZRNWV_ROOT/worker/scripts/commands.sh
  build

  . $THREE_ZRN_ROOT/scripts/commands.sh
  all
}

build_all
