0.3.11 • Published 11 years ago

bigote v0.3.11

Weekly downloads
59
License
-
Repository
github
Last release
11 years ago

Build Status

bigote

Logic-less template engine

Compiles mushtache templates to AST which are then rendered using a super slim runtime engine. Please check the benchmarks to see the performance for yourself, even beats dust.js by 10-20%. Still an alpha product, use it to toy around.

Features

Full support for mustache templates. Please refer to examples directory for samples from mustache man pages.

Todo

  • Set delimiter - not yet supported (only default delimiters supported)

Load

To compile templates

var bigote=require('bigote');
// load the templates
var compiledTemplate = bigote.load(templateString);

Render

To render compiled template

// set the data in context and call
var result=bigote.render(compiledTemplate, context);

Browser

To use it on the browser side, include the script from dist directory

<script src="bigote-full-0.3.0.js"></script>

To compile template

// load the template and partials (optional)
// templateString="...{{abc}}......";
// partials={partialName:"...my partial string {{xyz}} ...", ...}
var tmpl = bigote.load(templateString, partials);

To render template

// tmpl is from previous load statement
// ctx is the object that carries data
bigote.render(tmpl, ctx);

Performance

Please refer to benchmark directory (this directory have the benchmark files from dust.js updated with bigote for comparison). For those who want to see a screen shot.

Template engine

Tests

To run all the unit tests

// runs all the mocha tests, just issue
make

Notes

Useful Links

0.3.11

11 years ago

0.3.10

11 years ago

0.3.9

12 years ago

0.3.8

12 years ago

0.3.7

12 years ago

0.3.6

12 years ago

0.3.5

12 years ago

0.3.4

12 years ago

0.3.3

12 years ago

0.3.2

12 years ago

0.3.1

12 years ago

0.3.0

12 years ago

0.2.1

12 years ago

0.2.0

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago