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 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": {