diff --git a/Definitions/handlebars-1.0.d.ts b/Definitions/handlebars-1.0.d.ts
new file mode 100644
index 000000000..87b3c7caa
--- /dev/null
+++ b/Definitions/handlebars-1.0.d.ts
@@ -0,0 +1,21 @@
+// Type definitions for Handlebars 1.0
+// Project: http://handlebarsjs.com/
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+interface HandlebarsStatic {
+ registerHelper(name: string, fn: Function, inverse?: bool): void;
+ registerPartial(name: string, str): void;
+ K();
+ createFrame(object);
+
+ Exception(message: string): void;
+ SafeString(str: string): void;
+
+ parse(string: string);
+ print(ast);
+ logger;
+ log(level, str): void;
+ compile(environment, options?, context?, asObject?);
+}
+
+declare var Handlebars: HandlebarsStatic;
\ No newline at end of file
diff --git a/README.md b/README.md
index c281acfa4..87e7101c6 100644
--- a/README.md
+++ b/README.md
@@ -10,8 +10,10 @@ Complete
* [async](https://github.com/caolan/async)
* [Backbone.js](http://backbonejs.org/)
* [Bootstrap](http://twitter.github.com/bootstrap/)
+* [ember.js](http://emberjs.com/)
* [Express](http://expressjs.com/) (from TypeScript samples)
* [Fancybox](http://fancybox.net/)
+* [Handlebars](http://handlebarsjs.com/)
* [History.js](https://github.com/balupton/History.js/)
* [Humane.js](http://wavded.github.com/humane-js/) (by [jmvrbanac](https://github.com/jmvrbanac))
* [Impress.js](https://github.com/bartaz/impress.js)
@@ -31,13 +33,12 @@ Complete
Next
----
-* ember.js
-* Facebook SDK
* Knockout.Mapping
+* Angular.js
+* Facebook SDK
* jQuery.Validate
* jQuery Mobile
* google.visualization
-* Angular.js
* Meteor
* PhoneGap
* Isotope
diff --git a/Tests/handlebars-tests.ts b/Tests/handlebars-tests.ts
new file mode 100644
index 000000000..be78d887d
--- /dev/null
+++ b/Tests/handlebars-tests.ts
@@ -0,0 +1,77 @@
+///
+
+var context = {
+ author: { firstName: "Alan", lastName: "Johnson" },
+ body: "I Love Handlebars",
+ comments: [{
+ author: { firstName: "Yehuda", lastName: "Katz" },
+ body: "Me too!"
+ }]
+};
+Handlebars.registerHelper('fullName', (person) => {
+ return person.firstName + " " + person.lastName;
+});
+
+Handlebars.registerHelper('agree_button', () => {
+ return new Handlebars.SafeString(
+ ""
+ );
+});
+
+var source = "
Hello, my name is {{name}}. I am from {{hometown}}. I have " +
+ "{{kids.length}} kids:
" +
+ "{{#kids}}- {{name}} is {{age}}
{{/kids}}
";
+var template = Handlebars.compile(source);
+var data = { "name": "Alan", "hometown": "Somewhere, TX",
+ "kids": [{"name": "Jimmy", "age": "12"}, {"name": "Sally", "age": "4"}]};
+var result = template(data);
+
+Handlebars.registerHelper('link_to', (context) => {
+ return "" + context.body + "";
+});
+
+var context2 = { posts: [{url: "/hello-world", body: "Hello World!"}] };
+var source2 = "{{#posts}}- {{{link_to this}}}
{{/posts}}
"
+
+var template2 = Handlebars.compile(source2);
+template2(context2);
+
+Handlebars.registerHelper('link_to', (title, context) => {
+ return "" + title + "!"
+});
+
+var context3 = { posts: [{url: "/hello-world", body: "Hello World!"}] };
+var source3 = '{{#posts}}- {{{link_to "Post" this}}}
{{/posts}}
'
+var template3 = Handlebars.compile(source3);
+template3(context3);
+
+var source4 = "{{#people}}- {{#link}}{{name}}{{/link}}
{{/people}}
";
+Handlebars.registerHelper('link', (context, options) => {
+ return '' + context.fn(this) + '';
+});
+var template4 = Handlebars.compile(source4);
+var data2 = { "people": [
+ { "name": "Alan", "id": 1 },
+ { "name": "Yehuda", "id": 2 }
+]};
+template4(data2);
+
+var source5 = "{{#people}}- {{> link}}
{{/people}}
";
+Handlebars.registerPartial('link', '{{name}}')
+var template5 = Handlebars.compile(source5);
+var data3 = { "people": [
+ { "name": "Alan", "id": 1 },
+ { "name": "Yehuda", "id": 2 }
+]};
+template5(data3);
+
+Handlebars.registerHelper('list', (items, fn) => {
+ var out = "";
+ for(var i=0, l=items.length; i" + fn(items[i]) + "";
+ }
+ return out + "
";
+});
+Handlebars.registerHelper('fullName', (person) => {
+ return person.firstName + " " + person.lastName;
+});
\ No newline at end of file