hbt is an HTML bundler and template engine designed to simplify HTML development with template inheritance, partials, and minification. The current stable version is 1.0.0. It offers a lightweight alternative to heavier build tools like Webpack or Gulp for HTML-specific tasks, with built-in minification and a simple syntax. Releases are on an as-needed cadence via npm.
npm install hbtNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: read a template, compile it, render with data, and write output.
Use ES module imports (import hbt from 'hbt') and ensure package.json has "type": "module" or use .mjs extension.
Always pass a UTF-8 string to compile(). Use readFileSync with 'utf-8' encoding.
Always pass an object (even empty object {}) as data parameter.Change to dynamic import() or convert your project to ESM (e.g., add "type": "module" in package.json).
Read the file contents with readFileSync first, then pass the string to compile().
Ensure render() second argument is an object (e.g., render(compiled, {})).No dependency data recorded yet.