Rewrite the launcher in MoonBit (old code moves to legacy/) (#1)
This commit was merged in pull request #1.
This commit is contained in:
1 parent
7d2bf5996f
commit
2fa7bd745b
150 files changed
+8319
-462
No files matched your search
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds the page: the MoonBit program (web/*.mbt, js backend) plus its static files,
|
||||
# into dist/web/. With --demo the browser demo's apps.json and widgets.json come too;
|
||||
# the APK build leaves them out (the shell answers those URLs itself).
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
export PATH="$HOME/.moon/bin:$PATH"
|
||||
moon build --target js --release
|
||||
out=dist/web
|
||||
rm -rf "$out" && mkdir -p "$out"
|
||||
cp _build/js/release/build/web/web.js "$out/launcher.js"
|
||||
cp web/index.html web/style.css "$out/"
|
||||
if [ "${1:-}" = "--demo" ]; then cp web/apps.json web/widgets.json "$out/"; fi
|
||||
echo "built $out ($(wc -c < "$out/launcher.js") bytes of JS)"
|
||||
Reference in new issue
Block a user