htmltemplate-vdom

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i htmltemplate-vdom

Weekly Downloads

14

Version

1.0.0

License

MIT

Last publish

Collaborators

  • agentcooper