SPARK-1028 Update web UI build script to produce full bundle on linux. Also +x
This commit is contained in:
1 parent
d9f1c17053
commit
ff49178dff
2 files changed
+21
-7
No files matched your search
@@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
cd %~dp0
|
||||
bash -c "./build.sh"
|
||||
|
||||
Regular → Executable
+21
-3
@@ -8,6 +8,10 @@ PROTO_LIST="../../lib/api/*.proto ../../lib/api/services/*.proto ../../lib/domai
|
||||
|
||||
alias npx='npx --no-install'
|
||||
|
||||
if [ ! -d "node_modules" ]; then
|
||||
npm install
|
||||
fi
|
||||
|
||||
# Run pbjs to produce protobuf module
|
||||
echo \* pbjs
|
||||
npx pbjs -t json-module -w commonjs -o $OUT/api/proto.js $PROTO_LIST
|
||||
@@ -17,6 +21,7 @@ npx pbjs -t json-module -w commonjs -o $OUT/api/proto.js $PROTO_LIST
|
||||
# We generate them here and then delete them after the typescript build
|
||||
echo \* protoc
|
||||
mkdir src/gen 2> /dev/null
|
||||
PYTHONPATH=../../../externals/linux/python/ \
|
||||
../../../externals/linux/bin/protoc \
|
||||
--plugin=protoc-gen-service=../../lib/api/service_compiler/plugin.py \
|
||||
--service_out=lang=js,strip_out_path=1:src/gen \
|
||||
@@ -25,7 +30,7 @@ mkdir src/gen 2> /dev/null
|
||||
$PROTO_LIST
|
||||
|
||||
# run typescript compiler to convert typescript to javascript
|
||||
echo \* tsc
|
||||
echo \* tsc -- Errors in descriptor.ts are OK
|
||||
npx tsc -p tsconfig.release.json
|
||||
|
||||
# cleanup
|
||||
@@ -37,9 +42,22 @@ ts2fable() {
|
||||
for FILE in $1/*.d.ts; do
|
||||
filename=$(basename -- $FILE)
|
||||
filename="${filename%.d.ts}"
|
||||
npx ts2fable $1/$filename.d.ts $1/$filename.fs
|
||||
npx ts2fable $1/$filename.d.ts $1/$filename.fs &
|
||||
done
|
||||
wait
|
||||
}
|
||||
|
||||
ts2fable $OUT/api
|
||||
ts2fable $OUT/api/gen
|
||||
ts2fable $OUT/api/gen
|
||||
|
||||
if [ "$1" == "-full" ]; then
|
||||
echo \* fable
|
||||
cd ../ui/
|
||||
if [ ! -d "node_modules" ]; then
|
||||
npm install
|
||||
fi
|
||||
cd src
|
||||
dotnet restore
|
||||
dotnet fable webpack -- -p
|
||||
cp ../public/* ../$OUT/ui/
|
||||
fi
|
||||
Reference in new issue
Block a user