The minify.sh
script applies minification commands to every html, css and javascript files passed as parameters.
Default commands are:
htmlmin --remove-comments --remove-empty-space --keep-pre-attr
for html files;yui-compressor --type=css
for css files; anduglifyjs --mangle --compress --
for javascript files.
They can be changed with options --html <cmd>
, --css <cmd>
and --js <cmd>
.
Minified files are first stored in a temporary file and then renamed as the original file. The default file temporary extension is .tmp
and can be changed with the --tmp-ext <extension>
option. Note that <extension>
do not need a leading .
.
Please note that the files will be modified in the executing folder.
If the --stat <filename>
argument is supplied, compression statistics will be appended to <filename>
.
The --dry-run
option displays the commands the script would have run.
The compress.sh
script compresses each file passed on the command line.
If the compressed file is bigger than the original file, it is removed.
If the --stat <filename>
argument is supplied, compression statistics will be appended to <filename>
.
Fetch an SSL certificate for every domain passed as an argument from Let's Encrypt by using Certbot with the Nginx method.