handledom

An HTML template engine for DOM lovers.
How to use: with compilation on the browser
Install handledom
:
npm i handledom
Then, use it:
import handledom from "handledom/browser"
const template = handledom`<p>Hello, {{ name }}!</p>`
const { root, update } = template({
name: "Pierre"
})
document.body.append(root)
Contribute
Install and Build
We need a JVM (Java Virtual Machine) to build the parser because we use ANTLR, which is a Java program. So, at first, install a JVM on your system.
In a terminal, open the cloned handledom/handledom/
repository. Then:
wget https://www.antlr.org/download/antlr-4.7.2-complete.jar
npm install
Development environment
With VS Code, our recommanded plugins are:
- ANTLR4 grammar syntax support from Mike Lischke (
mike-lischke.vscode-antlr4
) - TSLint from Microsoft (
ms-vscode.vscode-typescript-tslint-plugin
)