Utilitiesv0.1.3
@tekir/view
Engine-agnostic SSR: Eta, EJS, Handlebars, Pug, React.
Installation
$
bun add @tekir/viewFeatures
- Engine-agnostic: plug in Eta, EJS, Handlebars, Pug, or React
- ViewProvider for automatic registration
- Configurable views directory and file extension
- Render options passed through to engine
- View class with render() method
Quick Example
TypeScript
import { View } from '@tekir/view'
const view = new View({
engine: myEtaEngine,
viewsDir: './resources/views',
})
const html = await view.render('welcome', { name: 'Ali' })Changelog
v0.1.3LatestSeptember 16, 2026
- Rendered responses no longer attach a body to status codes that forbid one.
- Published output now uses the shared Node-targeted ESM bundle pipeline with external dependencies and generated TypeScript declarations, while Bun consumers keep the native source export.
v0.1.2July 23, 2026
- Package metadata now follows the shared compatible
0.1.xdependency range used by this coordinated Tekir release.
v0.1.1June 13, 2026
render()now setsX-Content-Type-Options: nosniffby default; callers can override it viaheaders.- The
ViewEngineinterface now documents the security contract that engine output must return escaped HTML. - Found and fixed with Fable.
v0.1.0April 1, 2026
- Initial release