Installation
Prerequisites
Section titled “Prerequisites”- Node.js — ≥ 18 for the published npm package and native addon builds (see root
package.jsonengines). The documentation site indocs/is built with Astro and requires Node ≥ 22.12 (seedocs/package.jsonengines); use that version when runningnpm run devornpm run buildindocs/. - Rust (stable) and a C toolchain (for
napi-rsnative builds)
From the repository
Section titled “From the repository”cd runjucksnpm installnpm run buildnpm run build runs napi build and produces runjucks.*.node, index.js, and index.d.ts for your platform.
Debug build:
npm run build:debugUsing the package
Section titled “Using the package”import { renderString, Environment } from '@zneep/runjucks'
console.log(renderString('Hello {{ name }}', { name: 'Ada' }))
const env = new Environment()env.setAutoescape(true)console.log(env.renderString('Plain text', {}))See JavaScript API for configure, template maps, and extensions, and the Node.js API reference for full TypeScript signatures.