Skip to content

Production build

uldisrudzitis edited this page Oct 8, 2025 · 3 revisions
  • Install PHP dependencies except requirements for development cd _api_app and composer install --no-dev
  • Build Angular app for production cd editor then npm install then npm run build. This creates engine/dist folder with production ready files.
  • Delete editor folder with Angular application source code it's not needed for production.

Shell script:

#!/bin/bash
# Compile a Berta for production

if [[ $(node -v) != v20* ]]; then
    echo "❌ Error: This script requires Node.js v20.x"
    echo "Current version: $(node -v)"
    echo "Please use Node.js v20 and try again. (nvm use 20)"
    exit 1
fi

echo "✓ Node.js v20 detected"
echo "Proceeding with the build..."

cd _api_app
composer install --no-dev
cd ../editor
npm install
npm run build
cd ..
rm -rf editor
echo "Done."

Clone this wiki locally