Run [page minifier](https://www.npmjs.com/package/minify) locally before deployment

This commit is contained in:
KazushiM
2023-01-31 23:27:04 +08:00
parent a5e63bc034
commit 9cfe812247
6 changed files with 17 additions and 826 deletions

View File

@@ -1,6 +1,15 @@
#!/bin/bash
[ -d "./tmp" ] || mkdir ./tmp
[ -d "./dist" ] || mkdir ./dist
cp -Rf ./src/*.html ./dist/
# README_HTML=`pandoc -f gfm -t html5 ../README.md`
tsc ./src/main.ts --outDir ./dist/ -lib es2015,dom -t es2015
cp -Rf ./src/*.html ./tmp/
tsc ./src/main.ts --outDir ./tmp/ -lib es2015,dom -t es2015
for FILE in ./tmp/*; do
minify "${FILE}" > "./dist/${FILE/.\/tmp\/}"
done
rm -fr ./tmp

404
pages/dist/index.html vendored

File diff suppressed because one or more lines are too long

406
pages/dist/main.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -380,7 +380,7 @@
<form id="form">
<label for="file">
<input id="file" type="file">
<p id="cust_rev">Upload loader.kip here</p>
<small id="cust_rev">Upload loader.kip here</small>
</label>
</form>
</body>

View File

@@ -72,7 +72,6 @@ class CustEntry {
}
createElement() {
let form = document.getElementById("form")!;
let input = this.getInputElement();
if (!input) {
let grid = document.createElement("div");
@@ -97,7 +96,7 @@ class CustEntry {
desc.setAttribute("for", this.id);
grid.appendChild(desc);
form.appendChild(grid);
document.getElementById("form")!.appendChild(grid);
let tooltip = new ErrorToolTip(this.id);
tooltip.addChangeListener();