chore!: use gosh for building assets

This is a breaking change because it makes Anubis rely on Go 1.25
ahead of #1525. I think that the change is worth it, but Fedora
et.al updates slowly and I really don't want to rock the boat.

One of the main reasons to do this is that this enables the ability
to build Anubis on Windows (#1304).

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2026-03-21 11:32:07 +00:00
parent edbfd180b8
commit e1aaee29b9
9 changed files with 36 additions and 36 deletions

View File

@@ -8,7 +8,7 @@ LICENSE='/*
@licstart The following is the entire license notice for the
JavaScript code in this page.
Copyright (c) 2025 Xe Iaso <xe.iaso@techaro.lol>
Copyright (c) 2026 Xe Iaso <xe.iaso@techaro.lol>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -41,9 +41,9 @@ for the JavaScript code in this page.
mkdir -p static/js
for file in js/*.tsx; do
filename="${file##*/}" # Extracts "app.jsx" from "./js/app.jsx"
output="${filename%.tsx}.js" # Changes "app.jsx" to "app.js"
echo $output
filename="${file##*/}" # Extracts "app.jsx" from "./js/app.jsx"
output="${filename%.tsx}.js" # Changes "app.jsx" to "app.js"
echo $output
esbuild "${file}" --minify --bundle --outfile=static/"${output}" --banner:js="${LICENSE}"
done
esbuild "${file}" --minify --bundle --outfile=static/"${output}" --banner:js="${LICENSE}"
done

View File

@@ -17,7 +17,7 @@ import (
"github.com/a-h/templ"
)
//go:generate ./build.sh
//go:generate go tool gosh ./build.sh
//go:generate go tool github.com/a-h/templ/cmd/templ generate
//go:embed static/app.js