#!/usr/bin/env bash
set -e

# We make the directories if they don't exist so that the following delete commands work outside of docker.  These
# directories are automatically created via volume mounts when using docker, so the -p flag prevents these commands
# from failing
mkdir -p lib
mkdir -p es

# We can't delete the directories themselves when inside docker because they are the volume mount points, so instead we
# delete everything in them.
rm -rf lib/*
rm -rf es/*
rm -f tsconfig.tsbuildinfo

yarn installTranslations
yarn build:es
yarn build:types
