ray/build-webui.sh
Wapaul1 08707f9408 Integration of Webui with Ray (#32)
* Initial integration of webui with ray

* Re-organized calling of build-webui in setup.py

* Fixed Lint comments on js code

* Fixed more lint issues

* Fixed various issues

* Fixed directory in services.py

* Small changes.

* Changes to match lint
2016-11-17 22:33:29 -08:00

32 lines
703 B
Bash
Executable file

#!/usr/bin/env bash
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
unamestr="$(uname)"
if [[ "$unamestr" == "Linux" ]]; then
platform="linux"
elif [[ "$unamestr" == "Darwin" ]]; then
platform="macosx"
else
echo "Unrecognized platform."
exit 1
fi
WEBUI_DIR="$ROOT_DIR/webui"
PYTHON_DIR="$ROOT_DIR/lib/python"
PYTHON_WEBUI_DIR="$PYTHON_DIR/webui"
pushd "$WEBUI_DIR"
npm install
if [[ $platform == "linux" ]]; then
nodejs ./node_modules/.bin/webpack -g
elif [[ $platform == "macosx" ]]; then
node ./node_modules/.bin/webpack -g
fi
pushd node_modules
rm -rf react* babel* classnames dom-helpers jsesc webpack .bin
popd
popd
cp -r $WEBUI_DIR/* $PYTHON_WEBUI_DIR/