diff --git a/.gitignore b/.gitignore index 33f7857..c44d96c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ .DS_Store .rvmrc runner.js +lib jquery.mustache.js +qooxdoo.mustache.js dojox yui3 -commonjs.mustache.js +requirejs.mustache.js + diff --git a/Rakefile b/Rakefile index cc2830e..fb306f7 100644 --- a/Rakefile +++ b/Rakefile @@ -21,7 +21,7 @@ end # use different template files and final locations. def templated_build(name, opts={}) short = name.downcase - source = "mustache-#{short}" + source = File.join("wrappers", short) dependencies = ["mustache.js"] + Dir.glob("#{source}/*.tpl.*") target_js = opts[:location] ? "mustache.js" : "#{short}.mustache.js" @@ -34,12 +34,12 @@ def templated_build(name, opts={}) mkdir_p opts[:location] if opts[:location] sh "cat #{source}/#{target_js}.tpl.pre mustache.js \ - #{source}/#{target_js}.tpl.post > #{opts[:location] || '.'}/#{target_js}" + #{source}/#{target_js}.tpl.post > #{opts[:location] || '.'}/#{target_js}" # extra if opts[:extra] sh "sed -e 's/{{version}}/#{version}/' #{source}/#{opts[:extra]} \ - > #{opts[:location]}/#{opts[:extra]}" + > #{opts[:location]}/#{opts[:extra]}" end puts "Done, see #{opts[:location] || '.'}/#{target_js}" diff --git a/mustache-commonjs/package.json b/mustache-commonjs/package.json deleted file mode 100644 index 74d3aba..0000000 --- a/mustache-commonjs/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "mustache", - "author": "http://mustache.github.com/", - "description": "{{ mustache }} in JavaScript — Logic-less templates.", - "keywords": ["template"], - "version": "{{version}}" -} diff --git a/mustache-commonjs/mustache.js.tpl.post b/wrappers/commonjs/mustache.js.tpl.post similarity index 100% rename from mustache-commonjs/mustache.js.tpl.post rename to wrappers/commonjs/mustache.js.tpl.post diff --git a/mustache-commonjs/mustache.js.tpl.pre b/wrappers/commonjs/mustache.js.tpl.pre similarity index 100% rename from mustache-commonjs/mustache.js.tpl.pre rename to wrappers/commonjs/mustache.js.tpl.pre diff --git a/lib/package.json b/wrappers/commonjs/package.json similarity index 53% rename from lib/package.json rename to wrappers/commonjs/package.json index 4a4cbb1..ebd7b6f 100644 --- a/lib/package.json +++ b/wrappers/commonjs/package.json @@ -1,8 +1,8 @@ { "name": "mustache", "author": "http://mustache.github.com/", - "description": "{{ mustache }} in JavaScript — Logic-less templates.", + "description": "Logic-less {{mustache}} templates in JavaScript", "keywords": ["template"], - "version": "0.3.1-dev-twitter", + "version": "{{version}}", "main": "./mustache" } diff --git a/mustache-dojo/mustache.js.tpl.post b/wrappers/dojo/mustache.js.tpl.post similarity index 100% rename from mustache-dojo/mustache.js.tpl.post rename to wrappers/dojo/mustache.js.tpl.post diff --git a/mustache-dojo/mustache.js.tpl.pre b/wrappers/dojo/mustache.js.tpl.pre similarity index 100% rename from mustache-dojo/mustache.js.tpl.pre rename to wrappers/dojo/mustache.js.tpl.pre diff --git a/mustache-jquery/jquery.mustache.js.tpl.post b/wrappers/jquery/jquery.mustache.js.tpl.post similarity index 100% rename from mustache-jquery/jquery.mustache.js.tpl.post rename to wrappers/jquery/jquery.mustache.js.tpl.post diff --git a/mustache-jquery/jquery.mustache.js.tpl.pre b/wrappers/jquery/jquery.mustache.js.tpl.pre similarity index 100% rename from mustache-jquery/jquery.mustache.js.tpl.pre rename to wrappers/jquery/jquery.mustache.js.tpl.pre diff --git a/mustache-qooxdoo/qooxdoo.mustache.js.tpl.post b/wrappers/qooxdoo/qooxdoo.mustache.js.tpl.post similarity index 100% rename from mustache-qooxdoo/qooxdoo.mustache.js.tpl.post rename to wrappers/qooxdoo/qooxdoo.mustache.js.tpl.post diff --git a/mustache-qooxdoo/qooxdoo.mustache.js.tpl.pre b/wrappers/qooxdoo/qooxdoo.mustache.js.tpl.pre similarity index 100% rename from mustache-qooxdoo/qooxdoo.mustache.js.tpl.pre rename to wrappers/qooxdoo/qooxdoo.mustache.js.tpl.pre diff --git a/mustache-requirejs/requirejs.mustache.js.tpl.post b/wrappers/requirejs/requirejs.mustache.js.tpl.post similarity index 100% rename from mustache-requirejs/requirejs.mustache.js.tpl.post rename to wrappers/requirejs/requirejs.mustache.js.tpl.post diff --git a/mustache-requirejs/requirejs.mustache.js.tpl.pre b/wrappers/requirejs/requirejs.mustache.js.tpl.pre similarity index 100% rename from mustache-requirejs/requirejs.mustache.js.tpl.pre rename to wrappers/requirejs/requirejs.mustache.js.tpl.pre diff --git a/mustache-yui3/mustache.js.tpl.post b/wrappers/yui3/mustache.js.tpl.post similarity index 100% rename from mustache-yui3/mustache.js.tpl.post rename to wrappers/yui3/mustache.js.tpl.post diff --git a/mustache-yui3/mustache.js.tpl.pre b/wrappers/yui3/mustache.js.tpl.pre similarity index 100% rename from mustache-yui3/mustache.js.tpl.pre rename to wrappers/yui3/mustache.js.tpl.pre