The goal of this project is to be a source of comparison for the many different templating libraries available for Node.js. By implementing templates in the most similar manner possible, we can get fairly accurate benchmarks between compile and render steps of various template libraries.
View all feature comparisons and templates on the Node Templates Page.
(Alphabetical Order)
- coffeekup@0.3.0
- dust@0.3.0
- ejs@0.4.2
- haml@0.4.2
- hamljs@0.5.1
- jade@0.16.0
- jqtpl@1.0.6
- mu2@0.5.3
- swig@0.5.0
- Templ8@0.2.1
node index.js [options]
node index.js --type 'render' --time 800 --comparisons 4
The type of test to run. Available types are compile
, render
or all (no parameter given). Defaults to all.
How long, in milliseconds, to run the tests for. Higher numbers can present more accurate results. Defaults 1000.
####--comparisons
or -c
Number
How many times to run each test. Defaults to 8.
If you'd like to contribute another library to this project, that'd be really awesome. Just to be fair, there are a few ground-rules:
- After cloning the repository, run
make
to install all dependencies and commit hooks. Your commits will automatically be required to pass JSLint. - Do not checkout or push to the
gh-pages
branch. Doing so on Github will create duplicate pages and hurt findability on search engines. - All libraries must be available via the NPM package install.
- Add the library and specific version number (no fuzzy versions allowed) to
package.json
. - Implement the template as closely as possible to all others provided. Shortcuts and optimizations to do the same thing are encouraged, especially if they make the library compile and render steps faster.
- Add the new template engine to the features table of
index.html
. - Do not add new benchmarks to the
index.html
file. Implementation will be reviewed and a full benchmark run will be done. - If you did all of that, you are really awesome.