Skip to content
This repository was archived by the owner on Aug 23, 2025. It is now read-only.
Prev Previous commit
Next Next commit
Add build script
  • Loading branch information
Rick Bergfalk committed Jan 13, 2019
commit c4b1d72f9c040b61936e7a91a16bcb0e23a6f791
18 changes: 18 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Get directory script is in
SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $SCRIPTS_DIR/..
SQLPAD_DIR=`pwd`

# Install node modules per package-lock.json
npm ci --prefix "$SQLPAD_DIR/client"
npm ci --prefix "$SQLPAD_DIR/server"

# Build front-end
npm run build --prefix "$SQLPAD_DIR/client"

# Copy front-end build to server directory
rm -rf server/public
mkdir server/public
cp -r ./client/build/* ./server/public