#!/bin/bash
set -e

npx tsc -p frontend/tsconfig.json
npx tsc-alias -p frontend/tsconfig.json -f
cp -r frontend/static/ dist/
# Delete the old static files and copy the new ones to the dist folder
rm -rf frontend/static/
cp -r frontend/src/index.html dist/static/
cp -r frontend/src/favicon.png dist/static/
cp -r frontend/src/modules/font-awesome/ dist/static/modules/font-awesome/
cp -r frontend/src/css/ dist/static/