Minify HTML templates (bootstrap) upon compiling program.
@@ -34,7 +34,8 @@ CLEANFILES = \
src/hoganjs.h \
src/chartsjs.h \
src/appjs.h \
- resources/tpls.html.tmp
+ resources/tpls.html.tmp \
+ resources/css/bootstrap.min.css.tmp
# Tpls
tpls.h: bin2c$(EXEEXT) resources/tpls.html
@@ -42,7 +43,8 @@ tpls.h: bin2c$(EXEEXT) resources/tpls.html
./bin2c resources/tpls.html.tmp src/tpls.h tpls
# Bootstrap
bootstrapcss.h: bin2c$(EXEEXT) resources/css/bootstrap.min.css
- ./bin2c resources/css/bootstrap.min.css src/bootstrapcss.h bootstrap_css
+ cat resources/css/bootstrap.min.css | sed "s/^[ \t]*//" | sed "/^$$/d" | tr -d "\r\n" > resources/css/bootstrap.min.css.tmp
+ ./bin2c resources/css/bootstrap.min.css.tmp src/bootstrapcss.h bootstrap_css
# Font Awesome
facss.h: bin2c$(EXEEXT) resources/css/fa.min.css
./bin2c resources/css/fa.min.css src/facss.h fa_css
