-
Notifications
You must be signed in to change notification settings - Fork 33
Production build
uldisrudzitis edited this page Sep 29, 2026
·
5 revisions
- Install PHP dependencies except requirements for development
cd _api_appandcomposer install --no-dev - Build Angular app for production
cd editorthennpm installthennpm run build. This createsengine/distfolder with production ready files. - Delete
editorfolder with Angular application source code it's not needed for production.
Shell script:
#!/bin/bash
# Compile a Berta for production
if [[ $(node -v) != v24* ]]; then
echo "❌ Error: This script requires Node.js v24.x"
echo "Current version: $(node -v)"
echo "Please use Node.js v24 and try again. (nvm use 24)"
exit 1
fi
echo "✓ Node.js v24 detected"
echo "Proceeding with the build..."
echo "Install PHP dependencies"
cd _api_app
composer install --no-dev
cd ..
echo "Install legacy assets"
npm install
npm run build
rm -rf node_modules
echo "Install Angular editor dependencies"
cd editor
npm install
npm run build
cd ..
rm -rf editor
echo "Done."