remove: obsolete HTML template processing system
- Remove index.html.template (template processing never implemented) - Fix empty title in index.html by adding proper default title - Update documentation to remove references to non-existent: - scripts/process-html.sh - predev/prebuild npm scripts - HTML template processing workflow - Simplifies build process and fixes broken page title
This commit is contained in:
@@ -8,8 +8,7 @@ rxminder/
|
||||
├── 📦 package.json # Dependencies and scripts
|
||||
├── ⚙️ vite.config.ts # Build configuration
|
||||
├── 📝 tsconfig.json # TypeScript configuration
|
||||
├── 🎨 index.html # Generated entry point
|
||||
├── 🎨 index.html.template # Template for HTML generation
|
||||
├── 🎨 index.html # Application entry point
|
||||
├── 🔒 .env.example # Environment template
|
||||
├── 📊 metadata.json # Project metadata
|
||||
├── 🖼️ banner.jpeg # Project banner image
|
||||
@@ -99,7 +98,6 @@ rxminder/
|
||||
│
|
||||
├── 📁 scripts/ # Development and build scripts
|
||||
│ ├── 🔧 setup.sh # Development setup
|
||||
│ ├── 🎨 process-html.sh # HTML template processing
|
||||
│ ├── 🧹 setup-pre-commit.sh # Git hooks setup
|
||||
│ └── 🌱 seed-production.js # Database seeding
|
||||
│
|
||||
@@ -207,9 +205,9 @@ Centralized configuration with environment-based templates:
|
||||
config/
|
||||
└── unified.config.ts # Single source of truth
|
||||
|
||||
# Template approach
|
||||
index.html.template → index.html # Processed with environment variables
|
||||
# Configuration approach
|
||||
.env.example → .env # User customization
|
||||
config/unified.config.ts # Centralized configuration
|
||||
```
|
||||
|
||||
**Benefits:**
|
||||
@@ -274,7 +272,6 @@ docs/
|
||||
2. **Template Processing**
|
||||
|
||||
```bash
|
||||
bun run predev # Process HTML templates
|
||||
bun run dev # Start development server
|
||||
```
|
||||
|
||||
|
||||
@@ -159,23 +159,20 @@ APP_NAME=MedicationTracker
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
1. **App name not displaying**: Check `config/unified.config.ts` for correct `APP_NAME` value
|
||||
2. **Docker build fails**: Check that environment variables are properly set
|
||||
|
||||
1. **HTML title not updating**: Ensure `index.html.template` exists and `process-html.sh` runs
|
||||
2. **Docker build fails**: Check that `APP_NAME` doesn't contain invalid characters for Docker tags
|
||||
3. **Kubernetes deployment fails**: Verify `APP_NAME` follows Kubernetes naming conventions
|
||||
|
||||
### Validation
|
||||
## Testing
|
||||
|
||||
```bash
|
||||
# Test HTML processing
|
||||
APP_NAME=TestApp ./scripts/process-html.sh
|
||||
# Test configuration
|
||||
bun run config
|
||||
|
||||
# Test Docker build
|
||||
APP_NAME=TestApp make deploy
|
||||
# Test build
|
||||
bun run build
|
||||
|
||||
# Check generated files
|
||||
grep -r "TestApp" dist/
|
||||
# Check configuration values
|
||||
bun run config:env
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title></title>
|
||||
<title>Medication Reminder</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>$APP_NAME</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<script>
|
||||
tailwind.config = {
|
||||
darkMode: 'class',
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
sans: ['Inter', 'sans-serif'],
|
||||
},
|
||||
keyframes: {
|
||||
float: {
|
||||
'0%, 100%': { transform: 'translateY(0px)' },
|
||||
'50%': { transform: 'translateY(-10px)' },
|
||||
},
|
||||
},
|
||||
animation: {
|
||||
float: 'float 3s ease-in-out infinite',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<script type="importmap">
|
||||
{
|
||||
"imports": {
|
||||
"react": "https://aistudiocdn.com/react@^19.1.1",
|
||||
"react/": "https://aistudiocdn.com/react@^19.1.1/",
|
||||
"react-dom/": "https://aistudiocdn.com/react-dom@^19.1.1/"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<link rel="stylesheet" href="/index.css" />
|
||||
</head>
|
||||
|
||||
<body class="bg-slate-50 dark:bg-slate-900 antialiased">
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/index.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user