Add ViewEngine for easy server integration

- ViewEngine manages views directory with path resolution
- Auto-loads mixins from views/mixins/ directory
- Simplifies template paths (relative to views dir, auto-adds extension)
- Updated example app to use ViewEngine
- Added example mixins (buttons.pug, cards.pug)
- Updated CLAUDE.md with ViewEngine documentation
This commit is contained in:
2026-01-17 18:50:16 +05:30
parent a65f01fdd0
commit 4538b17f0a
7 changed files with 363 additions and 89 deletions

View File

@@ -0,0 +1,11 @@
mixin card(title)
.card
.card-header
h3= title
.card-body
block
mixin card-simple(title, body)
.card
h3= title
p= body