easy deploy

This commit is contained in:
Simon Gardling 2022-02-11 09:47:07 -05:00
parent 4d7d8b1b00
commit a56165236e
3 changed files with 18 additions and 2 deletions

1
.gitignore vendored
View File

@ -6,5 +6,4 @@ package-lock.json
/www/package-lock.json
/www/node_modules
/www/dist
/push.sh
/tmp

17
push.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
set -e #kill script if error occurs
wasm-pack build --target web --release
rm -fr tmp | true #delete tmp folder if exists
mkdir tmp
cp -r pkg www tmp/
mv tmp/www/index.html tmp/
sed -i 's/style.css/www\/style.css/g' tmp/index.html
sed -i 's/bootstrap.js/www\/bootstrap.js/g' tmp/index.html
echo "rsyncing"
rsync -av --delete --info=progress2 tmp/ rpi-public:/mnt/hdd/http_share/integrals/
rm -fr tmp

View File

@ -8,7 +8,7 @@
</head>
<body>
<noscript>Please enable Javascript, this page uses both WebAssembly and Javascript to run.</noscript>
<script src="./bootstrap.js"></script>
<script src="bootstrap.js"></script>
<main>
<h1>Integral Demonstration</h1>
<div id="coord"></div>