chore(challenge/preact): port to typescript

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-09-07 16:27:17 +00:00
parent 7e1b5d9951
commit ceb4dcdb4f
4 changed files with 91 additions and 66 deletions

View File

@@ -40,9 +40,9 @@ for the JavaScript code in this page.
mkdir -p static/js
for file in js/*.jsx; do
for file in js/*.tsx; do
filename="${file##*/}" # Extracts "app.jsx" from "./js/app.jsx"
output="${filename%.jsx}.js" # Changes "app.jsx" to "app.js"
output="${filename%.tsx}.js" # Changes "app.jsx" to "app.js"
echo $output
esbuild "${file}" --minify --bundle --outfile=static/"${output}" --banner:js="${LICENSE}"