initialize project

This commit is contained in:
2025-05-26 22:59:14 +02:00
commit 10ba53626f
7 changed files with 106 additions and 0 deletions

19
.editorconfig Normal file
View File

@@ -0,0 +1,19 @@
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = tab
[{makefile,Makefile}]
indent_style = tab
indent_size = tab
[*.{md,json,tsx,js,html,css}]
indent_style = tab
indent_size = tab
[*.{yaml}]
indent_style = space
tab_width = 2

15
.gitignore vendored Normal file
View File

@@ -0,0 +1,15 @@
# ignore all dotfiles
.*
# unignore specific dotfiles
!.gitignore
!.editorconfig
!/.github/
# ignore specific files
*.js
*.lock
/package-lock.json
/out/
/web/js/
/node_modules/

24
makefile Normal file
View File

@@ -0,0 +1,24 @@
ESBUILD ?= npx esbuild
ESFLAGS += --bundle --minify
# debug handling
DEBUG ?= 0
ifneq ($(DEBUG),0)
ESFLAGS += --define:NDEBUG=0
else
ESFLAGS += --define:NDEBUG=1
endif
.PHONY: all clean
all: out/script.js out/index.html
clean:; rm -rf out/
# generating of HTML
out/index.html: web/index.html
@mkdir -p $(@D)
cp -f $< $@
# compiles / links source code
out/script.js: web/src/*.tsx
@mkdir -p $(@D)
npx esbuild web/src/main.tsx $(ESFLAGS) --outfile=$@

13
package.json Normal file
View File

@@ -0,0 +1,13 @@
{
"$schema": "https://json.schemastore.org/package",
"dependencies": {
"esbuild": "^0.25.4",
"react": "^19.1.0",
"react-dom": "^19.1.0"
},
"devDependencies": {
"http-server": "^14.1.1",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2"
}
}

29
web/index.html Normal file
View File

@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/x-icon" href="https://placehold.co/64x64">
<title>PLACEHOLDER</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- social media embed thingies -->
<!-- TODO: replace PLACEHOLDER -->
<meta property="og:type" content="website" />
<meta property="og:title" content="PLACEHOLDER" />
<meta property="og:description" content="PLACEHOLDER" />
<meta property="og:url" content="https://www.thepigeongenerator.xyz/" />
<meta property="og:image" content="https://placehold.co/3000x3000" id="embed-image" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="3000" />
<meta property="og:image:height" content="3000" />
<meta property="og:image:alt" content="PLACEHOLDER" />
<!-- scripts -->
<script type="text/javascript" src="/script.js" defer></script>
</head>
<body id="root">
</body>
</html>

1
web/src/d.ts Normal file
View File

@@ -0,0 +1 @@
declare const NDEBUG: boolean;

5
web/src/main.tsx Normal file
View File

@@ -0,0 +1,5 @@
import React from 'react'
import { createRoot } from 'react-dom/client'
const Main = () => <h1>Hello, World</h1>
createRoot(document.getElementById("root")!).render(<Main />)