โ˜• CoffeeHaml

Haml structure. CoffeeScript semantics. React runtime.
Zero overhead. 50% fewer tokens than JSX.

GitHub npm

0
Runtime KB
~50%
Token Reduction
3
Extensions

Write This

.card
  %h2= post.title
  - if showBody
    .body= post.content

Get This

import { jsx, jsxs } from "react/jsx-runtime";

jsxs("div", { className: "card" },
  jsx("h2", null, post.title),
  ...(showBody ? [
    jsx("div", { className: "body" }, post.content)
  ] : [])
);

Quick Start

npm install coffeehaml

Vite

// vite.config.ts
import coffeehaml from 'coffeehaml/vite';

export default {
  plugins: [coffeehaml()],
};

CLI

npx coffeehaml compile app.coffeehaml

Supports .chaml, .coffeehaml, and .cohaml extensions. Full documentation on GitHub.