diff --git a/Rakefile b/Rakefile index 4629c97..6b9f442 100644 --- a/Rakefile +++ b/Rakefile @@ -44,6 +44,8 @@ templated_build "CommonJS", :location => "lib", :extra => "package.json" templated_build "jQuery" templated_build "Dojo", :location => "dojox/string" templated_build "YUI3", :location => "yui3/mustache" +templated_build "requirejs" + def version File.read("mustache.js").match('version: "([^\"]+)",$')[1] diff --git a/examples/nesting.html b/examples/nesting.html new file mode 100644 index 0000000..551366d --- /dev/null +++ b/examples/nesting.html @@ -0,0 +1,5 @@ +{{#foo}} + {{#a}} + {{b}} + {{/a}} +{{/foo}} diff --git a/examples/nesting.js b/examples/nesting.js new file mode 100644 index 0000000..1f76cd0 --- /dev/null +++ b/examples/nesting.js @@ -0,0 +1,7 @@ +var nesting = { + foo: [ + {a: {b: 1}}, + {a: {b: 2}}, + {a: {b: 3}} + ] +}; diff --git a/examples/nesting.txt b/examples/nesting.txt new file mode 100644 index 0000000..caf5afd --- /dev/null +++ b/examples/nesting.txt @@ -0,0 +1,4 @@ + 1 + 2 + 3 + diff --git a/mustache-requirejs/requirejs.mustache.js.tpl.post b/mustache-requirejs/requirejs.mustache.js.tpl.post new file mode 100644 index 0000000..632fd2a --- /dev/null +++ b/mustache-requirejs/requirejs.mustache.js.tpl.post @@ -0,0 +1,3 @@ + +return Mustache; +}); \ No newline at end of file diff --git a/mustache-requirejs/requirejs.mustache.js.tpl.pre b/mustache-requirejs/requirejs.mustache.js.tpl.pre new file mode 100644 index 0000000..160286d --- /dev/null +++ b/mustache-requirejs/requirejs.mustache.js.tpl.pre @@ -0,0 +1,6 @@ +/* +Shameless port of a shameless port ^ 2 +@defunkt => @janl => @aq => @voodootikigod => @timruffles + +*/ +define(function(){