mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-24 10:01:04 +01:00
fix(makefile): update minify-js target to conditionally skip based on agent and socket-proxy flags
This commit is contained in:
19
Makefile
19
Makefile
@@ -118,13 +118,18 @@ mod-tidy:
|
||||
done
|
||||
|
||||
minify-js:
|
||||
for file in $$(find internal/ -name '*.js' | grep -v -- '-min\.js$$'); do \
|
||||
ext="$${file##*.}"; \
|
||||
base="$${file%.*}"; \
|
||||
min_file="$${base}-min.$$ext"; \
|
||||
echo "minifying $$file -> $$min_file"; \
|
||||
bunx --bun uglify-js $$file --compress --mangle --output $$min_file; \
|
||||
done
|
||||
@if [ ${agent} = 1 ]; then \
|
||||
echo "minify-js: skipped for agent"; \
|
||||
elif [ ${socket-proxy} = 1 ]; then \
|
||||
echo "minify-js: skipped for socket-proxy"; \
|
||||
else \
|
||||
for file in $(find internal/ -name '*.js' | grep -v -- '-min\.js$'); do \
|
||||
ext="${file##*.}"; \
|
||||
base="${file%.*}"; \
|
||||
min_file="${base}-min.$ext"; \
|
||||
bunx --bun uglify-js $file --compress --mangle --output $min_file; \
|
||||
done \
|
||||
fi
|
||||
|
||||
build: minify-js
|
||||
mkdir -p $(shell dirname ${BIN_PATH})
|
||||
|
||||
Reference in New Issue
Block a user