From bc2778b69b741b002a97f5ab0b7722cb04c8e469 Mon Sep 17 00:00:00 2001 From: Nizar Mahmoud Date: Sat, 25 Apr 2020 09:53:15 +0300 Subject: [PATCH 1/2] Refactor: Replaced UglifyJS with Babel Minify for ES6+ Support --- entrypoint.sh | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 995d08e..21c1901 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -64,7 +64,7 @@ exec_minify_cmd () { out=$2 if [[ $file == *.js ]]; then - npx uglifyjs $file --compress --mangle --output $out + npx minify $file --out-file $out elif [[ $file == *.css ]]; then npx cleancss -o $out $file fi diff --git a/package.json b/package.json index 063d2d7..e4f0f78 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "repository": "nizarmah/auto-minify", "homepage": "https://github.com/nizarmah/auto-minify/", "dependencies": { - "uglify-js": "^3.8.0", + "babel-minify": "^0.5.1", "clean-css-cli": "^4.3.0" }, "author": { From 10b9269a54f61a36378070973ae40ae20ce88fa0 Mon Sep 17 00:00:00 2001 From: Nizar Mahmoud Date: Sat, 25 Apr 2020 09:58:35 +0300 Subject: [PATCH 2/2] Fix: Updated README.md to Say Babel-Minify Instead of UglifyJS --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 89d4617..d26daa9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # auto-minify -Minifies JS and CSS files with UglifyJS and CleanCSS +Minifies JS and CSS files with Babel-Minify and CleanCSS ### Inputs