forked from StudioInfinity/dyna3
Write a packaging script for the demo app
For flexible staging and deployment, tell Trunk to use relative URLs.
This commit is contained in:
parent
37c85ca29c
commit
b058cb984d
3 changed files with 24 additions and 0 deletions
2
app-proto/Trunk.toml
Normal file
2
app-proto/Trunk.toml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[build]
|
||||||
|
public_url = "./"
|
4
demo-summer-2025/.gitignore
vendored
Normal file
4
demo-summer-2025/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
/dyna3/index.html
|
||||||
|
/dyna3/dyna3-*.js
|
||||||
|
/dyna3/dyna3-*.wasm
|
||||||
|
/dyna3/main-*.css
|
18
tools/package-demo
Executable file
18
tools/package-demo
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# set paths. this technique for getting the script location comes from
|
||||||
|
# `mklement0` on Stack Overflow
|
||||||
|
#
|
||||||
|
# https://stackoverflow.com/a/24114056
|
||||||
|
#
|
||||||
|
tools=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")")
|
||||||
|
dist_src="$tools/../app-proto/dist"
|
||||||
|
dist_dest="$tools/../demo-summer-2025/dyna3"
|
||||||
|
|
||||||
|
# remove the old hash-named files
|
||||||
|
[ -e "$dist_dest"/dyna3-*.js ] && rm "$dist_dest"/dyna3-*.js
|
||||||
|
[ -e "$dist_dest"/dyna3-*.wasm ] && rm "$dist_dest"/dyna3-*.wasm
|
||||||
|
[ -e "$dist_dest"/main-*.css ] && rm "$dist_dest"/main-*.css
|
||||||
|
|
||||||
|
# copy the distribution
|
||||||
|
cp -r "$dist_src/." "$dist_dest"
|
Loading…
Add table
Add a link
Reference in a new issue