Skip to content

Commit 01a61a9

Browse files
committed
dashboard3: add minify option in Makefile
also: - add .gitignore for dashboard3.min.* files so they don't get committed
1 parent 8457bac commit 01a61a9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

dashboard/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dashboard3.min.*
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
all: dashboard
1+
all: dashboard minify
22

33
dashboard: Dashboard.hx
44
haxe -main Dashboard -D analyzer-optimize -dce full -D js-es=6 -js dashboard3.js
5+
6+
minify: dashboard3.js dashboard3.css ../../dashboard3.html
7+
# npm i -g terser csso-cli html-minifier-next
8+
terser dashboard3.js -c -m --ecma 2015 -o dashboard3.min.js
9+
csso dashboard3.css -o dashboard3.min.css
10+
html-minifier-next --collapse-whitespace --minify-js true ../../dashboard3.html -o ../../dashboard3.min.html

0 commit comments

Comments
 (0)