#!/bin/zsh

autostash MONO_DIR=$(AUTOENV_DISABLED=1 builtin cd $(dirname ${0}) && pwd -P)
autostash PATH=$(AUTOENV_DISABLED=1 builtin cd $MONO_DIR && pnpm bin):$PATH

__yarn () {
  echo "'yarn $@' is not supported. Please run '$@' instead."
}

__bundle () {
  echo "'bundle $@' is not supported. Please run '$@' instead."
}

autostash alias yarn='__yarn'
autostash alias bundle='__bundle'

autostash BIN_DIR="${MONO_DIR}/.bin"

autostash alias install="${BIN_DIR}/install.sh"
autostash alias lint="${BIN_DIR}/lint.sh"
autostash alias format="${BIN_DIR}/format.sh"
autostash alias deploy="${BIN_DIR}/deploy.sh"