Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add install script #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions install.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env bash

set -e

yarn install --frozen-lockfile

for dir in packages/*; do
echo "Installing... $dir"
pushd "$dir"
yarn install --frozen-lockfile
popd
echo "Done..."
echo ""
done

for dir in platform/*; do
echo "Installing... $dir"
pushd "$dir"
yarn install --frozen-lockfile
if [ -d "internal_pkgs" ]; then
for subdir in internal_pkgs/*; do
pushd "$subdir"
yarn install --frozen-lockfile
if [ "$(jq -r '.scripts.build' package.json)" != "null" ]; then
NODE_ENV=production yarn build
fi
popd
done
fi
popd
echo "Done..."
echo ""
done

NX_REJECT_UNKNOWN_LOCAL_CACHE=0 yarn nx run-many --target=build --verbose

for dir in platform/*; do
if [ "$dir" == "platform/wab" ]; then
continue
fi
echo "Building... $dir"
pushd platform/"$dir"
if [ -f package.json ]; then
if [ "\$(jq -r '.scripts.build' package.json)" != "null" ]; then
NODE_ENV=production yarn build
fi
fi
popd
echo "Done..."
echo ""
done

pushd platform/wab
make
NODE_ENV=production yarn build-css
export PUBLIC_URL="${PUBLIC_URL:-http://localhost:3003}"
echo "Building... wab for $PUBLIC_URL"
NODE_ENV=production yarn build
echo "Done..."
popd