Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

agentcooper/htmltemplate-vdom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

htmltemplate-vdom

TravisCI

WIP

npm install htmltemplate-vdom

HTML::Template engine on top of virtual-dom.

CLI

# will output compiled template
htmltemplate-vdom --path test/basic/template.tmpl

# will output compiled template and html using provided data
htmltemplate-vdom --path test/basic/template.tmpl --run test/basic/env.js

Examples

Precompiled

Demo

Source

Use npm run precompile to precompile example template.

Server render

Source

node example/server/index.js
Client runtime render

Not recommended, requires full parser and escodegen on the client.

Demo

Source

npm install
webpack

open example/client/index.html

Tests

# npm install mocha -g

npm test

Related

https://github.com/agentcooper/htmltemplate-react