generated from piesku/goodluck
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 74ab459 🚀
- Loading branch information
Showing
3,100 changed files
with
370,703 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
EXAMPLE ?= src | ||
SOURCES := $(shell find .. -type f -name "*.ts") | ||
|
||
all: index.html | ||
@printf "Size gzipped: %s bytes\n" $(shell gzip index.html --stdout | wc -c) | ||
|
||
game.esbuild.js: $(SOURCES) | ||
# Remove --noEmit to emit *.js files next to the source *.ts files. index.ts | ||
# will then import the emitted *.js files. This may produce a smaller build | ||
# because the bundle will be ordered differently. | ||
npx tsc --noEmit | ||
npx esbuild ../$(EXAMPLE)/index.ts \ | ||
--preserve-symlinks \ | ||
--define:DEBUG=false \ | ||
--target=es2022 \ | ||
--bundle \ | ||
--analyze \ | ||
> $@ | ||
|
||
game.sed.js: game.esbuild.js sed.txt | ||
sed -f sed.txt $< > $@ | ||
|
||
game.terser.js: game.sed.js terser_compress.txt node_modules | ||
npx --quiet terser $< \ | ||
--ecma 2022 \ | ||
--mangle toplevel \ | ||
--mangle-props keep_quoted,regex=/^[A-Z]/ \ | ||
--compress $(shell paste -sd, terser_compress.txt) \ | ||
> $@ | ||
|
||
game.roadroller.js: game.terser.js node_modules | ||
# Set -O2 for better (and longer) compression. | ||
npx --quiet roadroller -O1 --dirty $< -o $@ | ||
|
||
index.html: game.html game.roadroller.js game.css debug.css posthtml.cjs node_modules | ||
node posthtml.cjs $< > $@ | ||
|
||
# On Ubuntu, install p7zip-full. See https://www.7-zip.org/download.html. | ||
index.zip: index.html | ||
7z a -mx=9 -mfb=256 -mpass=15 $@ $^ | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -f *.js index.html index.zip | ||
|
||
node_modules: | ||
npm install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#debug { | ||
display: flex; | ||
flex-flow: column nowrap; | ||
align-items: flex-end; | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
color: #fff; | ||
font-family: monospace; | ||
} | ||
#debug button { | ||
cursor: pointer; | ||
padding: 0; | ||
background: none; | ||
border: none; | ||
font: inherit; | ||
color: inherit; | ||
} | ||
#debug div { | ||
width: max-content; | ||
background: #000; | ||
color: #fff; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
html, | ||
body { | ||
overflow: hidden; | ||
margin: 0; | ||
} | ||
canvas, | ||
main { | ||
position: absolute; | ||
width: 100vw; | ||
height: 100vh; | ||
overflow: hidden; | ||
word-break: break-word; | ||
user-select: none; | ||
touch-action: none; | ||
} | ||
[hidden] { | ||
display: none; | ||
} | ||
[onclick] { | ||
cursor: pointer; | ||
} | ||
.grabbing { | ||
cursor: grabbing; | ||
} |
Oops, something went wrong.