2017-03-27 21:32:32 -06:00
|
|
|
#!/bin/sh -e
|
2014-12-24 14:28:48 -07:00
|
|
|
. bin/lilarc
|
|
|
|
|
|
|
|
target=${1-dev}
|
|
|
|
|
|
|
|
mkdir -p public/compiled
|
|
|
|
|
2017-04-26 05:09:43 -06:00
|
|
|
apps="site chat2 challenge2 notify2 learn insight editor puzzle round2 analyse lobby tournament tournamentSchedule simul perfStat"
|
2016-07-28 03:17:48 -06:00
|
|
|
|
2017-04-29 12:36:25 -06:00
|
|
|
prll_sh=${PRLLSH-/etc/profile.d/prll.sh}
|
2016-07-28 03:17:48 -06:00
|
|
|
|
2017-03-27 16:22:27 -06:00
|
|
|
build_ts() {
|
|
|
|
cd ui/$1
|
2017-04-02 16:42:34 -06:00
|
|
|
rm -rf node_modules/types
|
2017-03-28 03:49:40 -06:00
|
|
|
rm -rf node_modules/common
|
|
|
|
rm -rf node_modules/chess
|
2017-03-27 16:22:27 -06:00
|
|
|
npm install --no-optional
|
|
|
|
npm run compile
|
|
|
|
cd -
|
|
|
|
}
|
|
|
|
|
2016-07-28 03:17:48 -06:00
|
|
|
build() {
|
|
|
|
app=$1
|
|
|
|
echo "Building $app"
|
2014-12-24 14:28:48 -07:00
|
|
|
cd ui/$app
|
2017-04-07 14:58:20 -06:00
|
|
|
rm -rf node_modules/types
|
2016-12-12 16:00:44 -07:00
|
|
|
rm -rf node_modules/common
|
|
|
|
rm -rf node_modules/chess
|
2016-12-13 05:23:25 -07:00
|
|
|
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 -
|
2016-07-28 03:17:48 -06:00
|
|
|
}
|
|
|
|
|
2017-04-02 16:42:34 -06:00
|
|
|
build_ts "common"
|
2017-03-27 21:32:32 -06:00
|
|
|
build_ts "chess"
|
2017-03-27 16:22:27 -06:00
|
|
|
build_ts "ceval"
|
2017-04-03 13:38:12 -06:00
|
|
|
build_ts "game"
|
2017-04-04 15:25:35 -06:00
|
|
|
build_ts "tree"
|
2017-03-27 16:22:27 -06:00
|
|
|
|
2016-07-28 03:17:48 -06:00
|
|
|
if [ -f $prll_sh ]; then # parallel execution!
|
|
|
|
. $prll_sh
|
|
|
|
prll build $apps
|
|
|
|
else # sequential execution
|
|
|
|
for app in $apps; do build $app; done
|
|
|
|
fi
|