setup html, css, typescript

This commit is contained in:
Simon 2023-02-06 16:48:11 +01:00
parent 52b8c87078
commit 96a6ef446a
9 changed files with 69 additions and 0 deletions

4
frontend/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
bundle.js
bundle.map.js

5
frontend/build.sh Normal file
View File

@ -0,0 +1,5 @@
set -xe
esbuild src/main.ts --outfile=bundle.js --minify --sourcemap --bundle

5
frontend/build_watch.sh Normal file
View File

@ -0,0 +1,5 @@
set -xe
esbuild src/main.ts --outfile=bundle.js --minify --sourcemap --bundle --watch

7
frontend/bundle.js.map Normal file
View File

@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["src/main.ts"],
"sourcesContent": ["\nfunction main() {\n console.log(\"hello world\");\n}\n\nmain();\n\n"],
"mappings": "MACA,SAASA,GAAO,CACZ,QAAQ,IAAI,aAAa,CAC7B,CAEAA,EAAK",
"names": ["main"]
}

5
frontend/check.sh Normal file
View File

@ -0,0 +1,5 @@
set -xe
tsc src/main.ts --noEmit

18
frontend/index.html Normal file
View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
<script src="bundle.js" defer></script>
<title>Postnummer App</title>
</head>
<body>
<div id="topbar">
<h2>Postnummer App</h2>
</div>
<main>
<img src="map.jpg" id="map"><br>
<div id="debug"></div>
</main>
</body>
</html>

BIN
frontend/map.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

7
frontend/src/main.ts Normal file
View File

@ -0,0 +1,7 @@
function main() {
console.log("hello world");
}
main();

18
frontend/style.css Normal file
View File

@ -0,0 +1,18 @@
* {
box-sizing: border-box;
}
body {
margin: 0;
height: 100vh;
}
main {
text-align: center;
}
#map {
max-width: 100%;
}