1.0.0 • Published 8 years ago

htmltemplate-vdom v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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