Today I have completed my project atpl.js.
atpl.js (Advanced TemPLates) tried to implement completely the Twig template system, but implementing it in Node.JS instead of PHP. I know a couple of projects that tried to do the same thing: swig and twig.js.
I started this project something like a year ago, but I decided to give some time to swig and twig.js projects so they could evolve and maybe implementing twig good enough for me. By mid-December 2012, with TypeScript just out, and after checking that swig and twig.js didn’t was mature enough, I decided to resume the work, but this time in TypeScript. And after sometime working on it intermittently since that moment until now, I have been implementing all the Twig functionalities I have constancy of.
atpl.js implements all the twig base, starting from conditional multiple-level inheritance, to variable interpolation inside strings, including all operators, macros, horizontal block reusal, all the filters, functions, tests and tags.
atpl.js is being developed completely using TDD (Test Driven Development), using travis-ci to do continuous testing. All the features supported by atpl.js include a unittest that verifies that it is working properly, and every tests is being executed by travis in each commit and release.
Right now I’m using atpl.js in several online projects and wip projects without any stability issues. Right now last version is 0.7.1 that will be 1.0.0 after I end documenting and cleaning up the code and fixing all the possible minor bugs that people would report.
In order to use atpl.js the only thing you need to install it in your project like any other nodejs module:
npm install atpl
Project website: https://github.com/soywiz/atpl.js