Skip to content

Instantly share code, notes, and snippets.

@i0466lt
Created April 25, 2020 19:03
Show Gist options
  • Save i0466lt/795f0ec9cf47843d7bf02c0598106f65 to your computer and use it in GitHub Desktop.
Save i0466lt/795f0ec9cf47843d7bf02c0598106f65 to your computer and use it in GitHub Desktop.
Comprime script JS ricorsivamente
#!/bin/bash
#
find ./ -type f \
-name "*.js" ! -name "*.min.*" ! -name "vfs_fonts*" \
-exec echo {} \; \
-exec uglifyjs -o {}.min {} \;
for file in ./*.js.min; do
mv "$file" "$(basename "$file" .js.min).min.js"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment