add presentation base
This commit is contained in:
1
client/.gitignore
vendored
Normal file
1
client/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/node_modules/
|
BIN
client/bun.lockb
Executable file
BIN
client/bun.lockb
Executable file
Binary file not shown.
12
client/index.html
Normal file
12
client/index.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title></title>
|
||||
<link href="css/style.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
33
client/make.mk
Normal file
33
client/make.mk
Normal file
@@ -0,0 +1,33 @@
|
||||
CLIENT_PAGES := index.html
|
||||
CLIENT_STYLES := style.css
|
||||
CLIENT_SCRIPTS := script.js
|
||||
CLIENT_TARGETS := $(CLIENT_PAGES:%=static/%) \
|
||||
$(CLIENT_STYLES:%=static/%) \
|
||||
$(CLIENT_SCRIPTS:%=static/%)
|
||||
|
||||
.PHONY: client_clean
|
||||
client_clean:
|
||||
rm -rf static
|
||||
rm -rf client/node_modules
|
||||
|
||||
client/node_modules:
|
||||
cd client && bun install
|
||||
|
||||
static/%.html: client/%.html client/node_modules
|
||||
@mkdir -p $(@D)
|
||||
cat $< | \
|
||||
bun run --cwd client html-minifier \
|
||||
--collapse-inline-tag-whitespace \
|
||||
--collapse-boolean-attributes \
|
||||
--collapse-whitespace \
|
||||
--remove-attribute-quotes \
|
||||
--remove-comments \
|
||||
--remove-redundant-attributes > $@
|
||||
|
||||
static/%.css: client/%.scss client/node_modules
|
||||
@mkdir -p $(@D)
|
||||
bun run --cwd client sass $(notdir $<) --style compressed > $@
|
||||
|
||||
static/%.js: client/%.ts client/node_modules
|
||||
@mkdir -p $(@D)
|
||||
bun build $< --minify --outfile $@
|
14
client/package.json
Normal file
14
client/package.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "client",
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@types/bun": "latest"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"html-minifier": "^4.0.0",
|
||||
"sass": "^1.87.0"
|
||||
}
|
||||
}
|
0
client/script.ts
Normal file
0
client/script.ts
Normal file
0
client/style.scss
Normal file
0
client/style.scss
Normal file
27
client/tsconfig.json
Normal file
27
client/tsconfig.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
// Enable latest features
|
||||
"lib": ["ESNext", "DOM"],
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleDetection": "force",
|
||||
"jsx": "react-jsx",
|
||||
"allowJs": true,
|
||||
|
||||
// Bundler mode
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"noEmit": true,
|
||||
|
||||
// Best practices
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Some stricter flags (disabled by default)
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false,
|
||||
"noPropertyAccessFromIndexSignature": false
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user