Skip to content

Commit 392a1af

Browse files
authored
Update build.sh
1 parent 8ebccd7 commit 392a1af

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎Build/Buildscripts/build.sh‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@ set -e
44
echo "Building HTMLRunner"
55

66
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7-
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" # one level up to /Build
7+
ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)" # project root
8+
BUILD_DIR="$ROOT_DIR/Build" # e.g., Build/
9+
DIST_DIR="$BUILD_DIR/dist" # final output
810

9-
cd "$ROOT_DIR"
11+
cd "$BUILD_DIR"
1012

1113
npm install
1214
npm run build
1315

16+
echo "Copying extra files..."
17+
cp "$ROOT_DIR/favicon.png" "$DIST_DIR/"
18+
cp "$ROOT_DIR/manifest.json" "$DIST_DIR/"
19+
cp "$ROOT_DIR/service-worker.js" "$DIST_DIR/"
20+
1421
echo "Build completed."

0 commit comments

Comments
 (0)