TeaWeb/scripts/web_build.sh
WolverinDEV 664f8b2abd
Implemented the Material Design and fixed some bugs (#33)
* cleaned up some files

* Fundamental style update

* Redesigned some style

* fixed hostbanner popup

* Removed old identity stuff

* fixed close listener

* Fixed changelog date

* fixed release chat icons

* fixed url

* Fixed hostbanner

* Uploaded missing images

* Improved update handling

* Improved script files

* Fixed loading error and icon error

* fixed Yes/No modal

* Fixed loader issues with MS Edge

* fixed modal style bug

* Fixed control bar overflow for small devices

* Improved error handling on identity creation

* Logging generate error to terminal

* fixed possible php error

* fixed some possible loading errors when other files have'nt been already loaded.

* removed debug message

* Changed emsrcypten flags

* Improved codec error handling

* removed webassembly as required dependency

* Improved and fixed channel tree issues

* Improved the sliders

* Removed unneeded files

* fixed loader versions cache

* second slight performance improved (dont animate elements anymore if they are not shown)

* Fixed query visibility setting

* not showing useless client infos for query clients

* Added an auto reconnect system

* Added a canceled message and increased reconnect interval

* removed implemented todo

* fixed repetitive channel names

* Reworked the channel tree selected lines

* Fixed channel tree names

* Fixed name alignment

* fixed the native client

* added min width to the server select groups to avoid a disappearing effect on shrink

* fixed bugged downloaded icons
2019-02-17 16:08:10 +01:00

92 lines
No EOL
2.2 KiB
Bash
Executable file

#!/usr/bin/env bash
source `dirname $0`/resolve_commands.sh
BASEDIR=$(dirname "$0")
cd "$BASEDIR/../"
if [[ "$1" == "development" ]] || [[ "$1" == "dev" ]]; then
source_path="web/environment/development"
type="development"
elif [[ "$1" == "release" ]] || [[ "$1" == "rel" ]]; then
source_path="web/environment/release"
type="release"
else
if [[ $# -lt 1 ]]; then
echo "Invalid argument count!"
else
echo "Invalid option $1"
fi
echo 'Available options are: "development" or "dev", "release" or "rel"'
exit 1
fi
echo "Generating style files"
npm run compile-sass
if [[ $? -ne 0 ]]; then
echo "Failed to generate style files"
exit 1
fi
echo "Generating web workers"
npm run build-worker
if [[ $? -ne 0 ]]; then
echo "Failed to build web workers"
exit 1
fi
#Lets build some tools
#dtsgen should be already build by build_declarations.sh
./tools/build_trgen.sh
if [[ $? -ne 0 ]]; then
echo "Failed to build typescript translation generator"
exit 1
fi
#Now lets build the declarations
echo "Building declarations"
./scripts/build_declarations.sh
if [[ $? -ne 0 ]]; then
echo "Failed to generate declarations"
exit 1
fi
if [[ "$type" == "release" ]]; then #Compile everything for release mode
#Compile the shared source first
echo "Building shared source"
./shared/generate_packed.sh
if [[ $? -ne 0 ]]; then
echo "Failed to build shared source"
exit 1
fi
#Now compile the web client itself
echo "Building web client"
./web/generate_packed.sh
if [[ $? -ne 0 ]]; then
echo "Failed to build web client"
exit 1
fi
elif [[ "$type" == "development" ]]; then
echo "Building shared source"
execute_ttsc -p ./shared/tsconfig/tsconfig.json
if [[ $? -ne 0 ]]; then
echo "Failed to compile shared sources"
exit 1
fi
echo "Building web client source"
execute_ttsc -p ./web/tsconfig/tsconfig.json
if [[ $? -ne 0 ]]; then
echo "Failed to compile web sources"
exit 1
fi
fi
echo "Generating environment"
php files.php generate web ${type}
if [[ $? -ne 0 ]]; then
echo "Failed to generate environment"
exit 1
fi
echo "Successfully build!"