0.0.5 • Published 10 years ago

amoebictemplating v0.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
10 years ago

AmoebicTemplating

A somewhat complete template engine that uses Javascript logic.

Usage

Place your javascript inside <% %> tags.

If you want to refer to a javascript variable inside your HTML, put the variable name inside of {{ }}.

To pass variables, create an array of objects with a name property and a value property.

To render a template:

var amoebic = require("amoebictemplating"); var data = {name:"name",value:"bob"}; var html = amoebic.render("<% var i = 1; console.log(i); if(i==1) { %>hi{{name}}{{i}} <% } %> oh well", data);

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago