diff options
author | Aleksander Machniak <alec@alec.pl> | 2021-01-01 13:17:25 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2021-01-01 13:17:25 +0300 |
commit | b379fbda5e1091ddcc367c4d6259ddc51477b679 (patch) | |
tree | 45bcbed3d6a4f0a9da7de67a984ed5906e4e1c40 /bin | |
parent | b3677c3e0bec72805a925967273fcd9844baa8f8 (diff) |
jsshrink.sh: Replace google-closure-compiler with UglifyJS (#7804)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/jsshrink.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/jsshrink.sh b/bin/jsshrink.sh index 18f4944a5..ee753990d 100755 --- a/bin/jsshrink.sh +++ b/bin/jsshrink.sh @@ -9,13 +9,13 @@ do_shrink() { rm -f "$2" # copy the first comment block with license information for LibreJS grep -q '@lic' $1 && sed -n '/\/\*/,/\*\// { p; /\*\//q; }' $1 > $2 - google-closure-compiler --compilation_level=SIMPLE_OPTIMIZATIONS --js="$1" --language_in="$3" >> $2 + uglifyjs --compress --mangle -- $1 >> $2 } -if which google-closure-compiler > /dev/null 2>&1; then +if which uglifyjs > /dev/null 2>&1; then : else - echo "google-closure-compiler not found. Please install e.g. 'npm install -g google-closure-compiler'." + echo "uglifyjs not found. Please install e.g. 'npm install -g uglify-js'." exit 1 fi |