Initial commit. Note that I'm using CommonJS modules and node purely to help me develop this. If this ends up being useful, I will likely distribute the entire package as a single JS file for easier consumption in the browser.

This commit is contained in:
wycats
2010-11-25 00:48:55 -08:00
commit 85fa2cb65f
8 changed files with 383 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
require.paths.push(__dirname + "/lib");
var Handlebars = require("handlebars");
var string = "foo {{ bar baz \"baz\" }}baz{{! foo bar baz }}{{#foo}} bar {{^}} baz {{/foo}}{{> partial }}{{# bar }}part1 {{^}} part2{{> foo }}{{/bar}}zomg"
var ast = Handlebars.parse(string);
Handlebars.print(ast);