# yanhaijing/template.js

A javascript template engine, simple, easy & extras, support webpack, rspack, vite, rollup, esbuild, parcel, browserify, fis and gulp.

Repository: https://github.com/yanhaijing/template.js
Canonical: https://ross.abutalabs.com/products/templatejs
Language: JavaScript
License: MIT
License Family: permissive
Topics: tmpl, arttemplate, templatejs, baidutemplate, juicer, handlebars, jade, fis, parcel, rollup, webpack, browserify, ejs, dotjs, template, rspack, vite, esbuild
Last push: 2025-03-16T15:41:06+00:00

## Health v2 (maintenance only)
Score: 37/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 11, release rhythm 35, longevity 100
- inputs: {"age_days": 4261, "days_push": 535, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1318, forks 484 (observed 2026-08-28T04:04:21.180003+00:00)

## What it is
template.js is a simple JavaScript template engine supporting parsing, compilation, and rendering with native JS syntax. It offers precompilation plugins for mainstream bundlers like webpack, vite, rollup, esbuild, and parcel, plus a CLI and editor plugins.

## Use cases
- render html templates from javascript data
- precompile templates with webpack or vite
- replace string concatenation with a template engine
- use a lightweight handlebars or ejs alternative
- set up a template project with a cli scaffolder
- highlight template syntax in vscode or sublime

## When to choose
- you want a simple, native-JS-syntax template engine
- you need precompilation integrated with your bundler
- you need both browser and Node support with TypeScript types
- you want JIT and AOT compilation modes

## When to avoid
- you need a full-featured framework like React or Vue for UI rendering
- you prefer logic-less templates like Mustache or Handlebars
- you need server-side templating for a non-JavaScript stack

## Facets
- artifact type: library
- maturity: active
- function: templating, parser, cli, plugin-system
- domain: web-development, frontend, developer-tools
- platform: browser, cross-platform, cli
- tags: template-engine, precompilation, jit, aot, webpack-plugin, vite-plugin, sandbox, typescript, nodejs

## Member repositories
- yanhaijing/template.js (main) score 37

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:21.180003+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:48:10.810773+00:00, confidence not recorded.
  - readme: https://github.com/yanhaijing/template.js (fetched 2026-08-28T04:04:21.180003+00:00, sha db2bcead0fef)
- Data as of 2026-08-30T08:39:29.467469+00:00.
