@ecfjs/view
v1.0.0-rc.5
Published
ECF template rendering engine with server-side view compilation and HTTP response integration
Maintainers
Readme
@ecfjs/view — AST View Engine
@ecfjs/view is the high-performance AST-based view compilation and rendering engine for the ECF (Elegant Core Framework) ecosystem.
Features
- ViewEngine — directive-based template compilation
- AST Compiler — lexer, parser, and node visitor pipeline
- CompiledTemplate Cache — sub-10ms compile with token caching
- Layout System —
@extends,@section,@yielddirectives - Expression Evaluator — safe template expression evaluation
- HTTP Integration —
response.view()rendering via@ecfjs/http
Quick Start
import { ViewEngine } from "@ecfjs/view";
const engine = new ViewEngine({ viewsPath: "./resources/views" });
const html = await engine.render("welcome", { name: "Alice" });Documentation
- ARCHITECTURE.md — package architecture
- BENCHMARKS.md — compile and render performance SLAs
License
MIT
