Plate is a Django Template Language implementation in Javascript. Super exciting!
Yes. Plate was designed to work well in the standard suite of browsers. Each minor point release will target compatibility with IE7+, FF3+, Chrome, and Safari 4+.
The most basic case:
var plate = require('plate'),
sys = require('sys');
var template = new plate.Template('hello {{ world }}');
template.render({world:'everyone'}, function(err, data) {
sys.puts(data);
});
// outputs "hello everyone"
Plate follows the Node.js style of taking callbacks that receive an error object and a data object. If there's no
error, err
will be null.
Plate is documented on it's github wiki. There are "Getting Started" guides for both in-browser as well as in-node environments.
Got a feature you'd like to add? I'd love to see it. The workflow is pretty standard Github fare:
The minimum requirements for a pull request to be merged are:
docs/
folder in Markdown format.In node:
$ npm install plate
$ npm test plate
$ git clone git@github.com:chrisdickinson/plate.git
$ cd plate
$ make browsertest
$ python -m SimpleHTTPServer &
$ open http://localhost:8000/test.html
Licensed new BSD.