mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-25 01:38:30 +02: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
|
done
|
||||||
|
|
||||||
minify-js:
|
minify-js:
|
||||||
for file in $$(find internal/ -name '*.js' | grep -v -- '-min\.js$$'); do \
|
@if [ ${agent} = 1 ]; then \
|
||||||
ext="$${file##*.}"; \
|
echo "minify-js: skipped for agent"; \
|
||||||
base="$${file%.*}"; \
|
elif [ ${socket-proxy} = 1 ]; then \
|
||||||
min_file="$${base}-min.$$ext"; \
|
echo "minify-js: skipped for socket-proxy"; \
|
||||||
echo "minifying $$file -> $$min_file"; \
|
else \
|
||||||
bunx --bun uglify-js $$file --compress --mangle --output $$min_file; \
|
for file in $(find internal/ -name '*.js' | grep -v -- '-min\.js$'); do \
|
||||||
done
|
ext="${file##*.}"; \
|
||||||
|
base="${file%.*}"; \
|
||||||
|
min_file="${base}-min.$ext"; \
|
||||||
|
bunx --bun uglify-js $file --compress --mangle --output $min_file; \
|
||||||
|
done \
|
||||||
|
fi
|
||||||
|
|
||||||
build: minify-js
|
build: minify-js
|
||||||
mkdir -p $(shell dirname ${BIN_PATH})
|
mkdir -p $(shell dirname ${BIN_PATH})
|
||||||
|
|||||||
Reference in New Issue
Block a user