lila/ui/build

40 lines
726 B
Plaintext
Raw Normal View History

2014-12-24 14:28:48 -07:00
#!/bin/sh
. bin/lilarc
target=${1-dev}
mkdir -p public/compiled
2017-03-09 07:20:18 -07:00
apps="site chat2 challenge2 notify2 learn insight editor puzzle round analyse lobby tournament tournamentSchedule simul perfStat"
prll_sh=/etc/profile.d/prll.sh
2017-03-27 16:22:27 -06:00
build_ts() {
cd ui/$1
npm install --no-optional
npm run compile
cd -
}
build() {
app=$1
echo "Building $app"
2014-12-24 14:28:48 -07:00
cd ui/$app
2016-12-12 16:00:44 -07:00
rm -rf node_modules/common
rm -rf node_modules/chess
rm -rf node_modules/game
2016-12-12 16:00:44 -07:00
rm -rf node_modules/tree
2016-12-15 04:46:59 -07:00
rm -rf node_modules/ceval
2016-01-06 04:05:21 -07:00
npm install --no-optional && gulp $target
2014-12-24 14:28:48 -07:00
cd -
}
2017-03-27 16:22:27 -06:00
build_ts "ceval"
if [ -f $prll_sh ]; then # parallel execution!
. $prll_sh
prll build $apps
else # sequential execution
for app in $apps; do build $app; done
fi