CSS-NibblePoker/minify.cmd
Herwin Bozet 88a40efb4e Initial commit
Update .gitignore, LICENSE-CC0, and 70 more files...
2024-11-04 22:53:06 +01:00

38 lines
666 B
Batchfile

@echo off
setlocal enabledelayedexpansion
:: Going into the script's directory
cd /D "%~dp0"
:minify
echo.
echo Minifying HTML
echo --------------
:minify-clean
echo Cleaning old files...
pushd %CD%
cd /d %~dp0\htdocs\
del /Q /S "*.min.html"
popd
:minify-run
echo Minifying HTML files...
pushd %CD%
cd /d %~dp0\htdocs
call html-minifier --case-sensitive ^
--collapse-whitespace ^
--decode-entities ^
--remove-attribute-quotes ^
--remove-comments ^
--sort-attributes ^
-o "index.min.html" ^
"index.html"
popd
:minify-end
:end