mirror of
https://codeberg.org/setop/elm-scripting
synced 2025-11-08 21:49:57 +00:00
20 lines
356 B
Bash
Executable File
20 lines
356 B
Bash
Executable File
#!/bin/sh -eu
|
|
|
|
w1="$(mktemp out_$$_1_XXXX.js)"
|
|
|
|
#elm make --optimize --output=${w1} src/Main.elm 1>&2
|
|
elm make --output=${w1} src/Main.elm 1>&2
|
|
sed -i -e 's!console.warn(!console.log(!g' ${w1}
|
|
|
|
w2="$(mktemp out_$$_XXXX.js)"
|
|
|
|
cat dom.js ${w1} launch.js > ${w2}
|
|
|
|
rm ${w1}
|
|
|
|
qjs --std ${w2}
|
|
|
|
# if qjs fails, output file will stay for debugging, else
|
|
|
|
rm ${w2}
|