kanidm/kanidmd_web_ui/build_wasm_release.sh
James Hodgkinson 4b1989ee22
updating csp headers (#852)
* removing confetti loader (we still package it, for now)
* 📎-happiness
* updating WASM build scripts and rebuilding
* updated CSP headers to change self to 'self' and remove some insecure https: options
2022-06-22 22:30:08 +10:00

15 lines
431 B
Bash
Executable file

#!/bin/sh
if [ -z "${BUILD_FLAGS}" ]; then
BUILD_FLAGS="--release"
fi
wasm-pack build ${BUILD_FLAGS} --target web || exit 1
touch ./pkg/ANYTHING_HERE_WILL_BE_DELETED_ADD_TO_SRC && \
rsync --delete-after -av ./src/img/ ./pkg/img/ && \
rsync --delete-after -av ./src/external/ ./pkg/external/ && \
cp ./src/style.css ./pkg/style.css && \
cp ./src/wasmloader.js ./pkg/wasmloader.js && \
rm ./pkg/.gitignore