#!/usr/bin/env bash

# Builds example projects and deploys them to GH Pages
WORKSPACE_PROJECTS=(integration-pwa integration-pwa-material)
set -e

# Workspace Projects
npm ci
rm -rf dist

for PROJECT in "${WORKSPACE_PROJECTS[@]}"
do
  echo Building ${PROJECT}
  node --max_old_space_size=6144 ./node_modules/.bin/ng build ${PROJECT} --prod --base-href
done

# Copy static assets
cp static/* dist

