2017-02-21 07:54:42 +01:00
|
|
|
#!/bin/bash
|
2017-03-20 11:51:20 +01:00
|
|
|
set -e
|
2017-03-01 10:14:09 +01:00
|
|
|
|
2017-06-23 10:23:28 +02:00
|
|
|
cd /harbor_src/ui_ng
|
2017-02-22 06:03:05 +01:00
|
|
|
rm -rf dist/*
|
2017-03-20 11:51:20 +01:00
|
|
|
|
|
|
|
npm_proxy=
|
|
|
|
|
|
|
|
while getopts p: option
|
|
|
|
do
|
|
|
|
case "${option}"
|
|
|
|
in
|
|
|
|
p) npm_proxy=${OPTARG};;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ ! -z "$npm_proxy" -a "$npm_proxy" != " " ]; then
|
|
|
|
npm config set proxy $npm_proxy
|
|
|
|
fi
|
2017-03-01 10:14:09 +01:00
|
|
|
|
2017-06-27 07:49:41 +02:00
|
|
|
#Check if node_modules directory existing
|
|
|
|
if [ ! -d "./node_modules" ]; then
|
|
|
|
mv /harbor_resources/node_modules ./
|
|
|
|
fi
|
2017-06-23 10:23:28 +02:00
|
|
|
|
2017-06-22 11:46:54 +02:00
|
|
|
cat ./package.json
|
2017-03-01 10:14:09 +01:00
|
|
|
npm install
|
2017-04-21 11:08:13 +02:00
|
|
|
|
|
|
|
./node_modules/.bin/ngc -p tsconfig-aot.json
|
|
|
|
sed -i 's/* as//g' src/app/shared/gauge/gauge.component.js
|
|
|
|
./node_modules/.bin/rollup -c rollup-config.js
|
2017-03-01 10:14:09 +01:00
|
|
|
|
2017-06-27 07:49:41 +02:00
|
|
|
#Copy built js to the static folder
|
|
|
|
cp ./dist/build.min.js ../ui/static/
|
|
|
|
|
2017-06-23 10:23:28 +02:00
|
|
|
cp -r ./src/i18n/ ../ui/static/
|
|
|
|
cp ./src/styles.css ../ui/static/
|
2017-02-21 07:54:42 +01:00
|
|
|
|
2017-06-23 10:23:28 +02:00
|
|
|
cp ./node_modules/clarity-icons/clarity-icons.min.css ../ui/static/
|
|
|
|
cp ./node_modules/mutationobserver-shim/dist/mutationobserver.min.js ../ui/static/
|
|
|
|
cp ./node_modules/@webcomponents/custom-elements/custom-elements.min.js ../ui/static/
|
|
|
|
cp ./node_modules/clarity-icons/clarity-icons.min.js ../ui/static/
|
|
|
|
cp ./node_modules/clarity-ui/clarity-ui.min.css ../ui/static/
|
|
|
|
cp -r ./node_modules/clarity-icons/shapes/ ../ui/static/
|