mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-12 03:28:45 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user