Minify sorttable.min.js and use that in daca2-report.py.

This commit is contained in:
XhmikosR 2014-03-16 17:58:48 +02:00
parent 3a4b7e5c07
commit b608a8904a
3 changed files with 14 additions and 1 deletions

View File

@ -66,6 +66,18 @@
echo();
echo("### Finished site/js/pack.js.");
minifiedJs = UglifyJS.minify(cat("site/js/sorttable.js"), {
compress: true,
fromString: true, // this is needed to pass JS source code instead of filenames
mangle: true,
warnings: false
});
fs.writeFileSync("site/js/sorttable.min.js", minifiedJs.code, "utf8");
echo();
echo("### Finished site/js/sorttable.min.js.");
};

1
htdocs/site/js/sorttable.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -42,7 +42,7 @@ mainpage.write('<head>\n')
mainpage.write('<meta charset="utf-8">\n')
mainpage.write('<title>DACA2</title>\n')
mainpage.write('<style>table { text-align: center; } td { font-size: 0.9em; padding:0.2em; } td + td { padding-left: 6em; } th { cursor: pointer; } th + th { padding-left:5em; } table.sortable th:not(.sorttable_sorted):not(.sorttable_sorted_reverse):after { content: " \25B4\25BE"; }</style>\n')
mainpage.write('<script src="/site/js/sorttable.js"></script>\n')
mainpage.write('<script src="/site/js/sorttable.min.js"></script>\n')
mainpage.write('</head>\n')
mainpage.write('<body>\n')
mainpage.write('<h1>DACA2</h1>\n')