Add TypeScript frontend build system with shared components
- Set up esbuild for fast TypeScript compilation of frontend code - Create SharedHeader component with factories for main/admin/privacy pages - Create SharedFooter component with standard and minimal variants - Add frontend build scripts (build:frontend, watch:frontend, dev:full) - Configure TypeScript for browser environment with DOM types - Add example page demonstrating shared component usage - Update .gitignore to exclude compiled frontend files Benefits: - Type-safe frontend components - Consistent headers/footers across all pages - Single source of truth for common UI elements - Built-in i18n and theme toggle support 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
7bee175003
commit
5151e87824
11 changed files with 986 additions and 4 deletions
11
package.json
11
package.json
|
@ -13,23 +13,24 @@
|
|||
"watch-css": "sass src/scss/main.scss public/style.css --watch --style=expanded --source-map",
|
||||
"dev-with-css": "concurrently \"npm run watch-css\" \"npm run dev\"",
|
||||
"dev-with-css:ts": "concurrently \"npm run watch-css\" \"npm run dev:ts\"",
|
||||
"build": "npm run build:ts && npm run build-css && npm run copy-i18n",
|
||||
"build": "npm run build:ts && npm run build-css && npm run build:frontend && npm run copy-i18n",
|
||||
"build:ts": "tsc",
|
||||
"copy-i18n": "mkdir -p dist/i18n/locales && cp -r src/i18n/locales/* dist/i18n/locales/",
|
||||
"test": "jest --runInBand --forceExit",
|
||||
"test:coverage": "jest --coverage",
|
||||
"lint": "eslint src/ tests/",
|
||||
"lint:fix": "eslint src/ tests/ --fix",
|
||||
"postinstall": "npm run build-css"
|
||||
"postinstall": "npm run build-css",
|
||||
"build:frontend": "node scripts/build-frontend.js",
|
||||
"watch:frontend": "node scripts/build-frontend.js --watch",
|
||||
"dev:full": "concurrently \"npm run watch-css\" \"npm run watch:frontend\" \"npm run dev:ts\""
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^17.0.1",
|
||||
"express": "^4.18.2",
|
||||
"express-rate-limit": "^7.5.1",
|
||||
"node-cron": "^3.0.3",
|
||||
|
||||
"sqlite3": "^5.1.6",
|
||||
"swagger-jsdoc": "^6.2.8",
|
||||
"swagger-ui-express": "^5.0.1"
|
||||
|
@ -38,6 +39,7 @@
|
|||
"@types/cors": "^2.8.19",
|
||||
"@types/express": "^5.0.3",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/leaflet": "^1.9.19",
|
||||
"@types/node": "^24.0.10",
|
||||
"@types/node-cron": "^3.0.11",
|
||||
"@types/sqlite3": "^3.1.11",
|
||||
|
@ -47,6 +49,7 @@
|
|||
"@typescript-eslint/eslint-plugin": "^8.35.1",
|
||||
"@typescript-eslint/parser": "^8.35.1",
|
||||
"concurrently": "^9.2.0",
|
||||
"esbuild": "^0.25.6",
|
||||
"eslint": "^9.30.1",
|
||||
"globals": "^16.3.0",
|
||||
"jest": "^29.7.0",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue