-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
401 additions
and
582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Call a JST compiler inside this folder. | ||
|
||
All your templates will be compiled into a single JS file. | ||
|
||
If you use Handlebars template, you can use this JST compiler: | ||
<https://github.com/wookiehangover/handlebars-jst> | ||
|
||
$ npm install -g handlebars-jst | ||
|
||
$ cd template | ||
|
||
$ tmpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
|
||
(function(){this.JST || (this.JST = {});this.JST["todo"] = function(context) { return HandlebarsTemplates["todo"](context); };this.HandlebarsTemplates || (this.HandlebarsTemplates = {});this.HandlebarsTemplates["todo"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { | ||
helpers = helpers || Handlebars.helpers; | ||
var buffer = "", stack1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression; | ||
|
||
|
||
buffer += "<!--\nThis is a handlebars template.\nThis template will be transformed into a function by the handlebars\ncompiler.\n\nYou just have to include the result of the compilation\n`template/templates.js` into the `index.html` to access your templates via\nthe JST namespace.\n\n JST[\"your-template-name\"]({ name: 'Hello', text: 'You rock !' });\n\nYou can use the following Handlebars JST compiler <https://github.com/wookiehangover/handlebars-jst>\n-->\n\n<h2>"; | ||
stack1 = helpers.name || depth0.name | ||
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); } | ||
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); } | ||
buffer += escapeExpression(stack1) + "</h2>\n<p>A custom paragraph here.</p>\n<p>"; | ||
stack1 = helpers.text || depth0.text | ||
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); } | ||
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "text", { hash: {} }); } | ||
buffer += escapeExpression(stack1) + "</p>\n"; | ||
return buffer;});}).call(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
<!-- | ||
This is a handlebars template. | ||
This template will be transformed into a function by the handlebars | ||
compiler. | ||
You just have to include the result of the compilation | ||
`template/templates.js` into the `index.html` to access your templates via | ||
the JST namespace. | ||
JST["your-template-name"]({ name: 'Hello', text: 'You rock !' }); | ||
You can use the following Handlebars JST compiler <https://github.com/wookiehangover/handlebars-jst> | ||
--> | ||
|
||
<h2>{{name}}</h2> | ||
<p>A custom paragraph here.</p> | ||
<p>{{text}}</p> |
Oops, something went wrong.