diff --git a/.gitignore b/.gitignore index 34478aa..7b9a915 100644 --- a/.gitignore +++ b/.gitignore @@ -1,35 +1,3 @@ runner.js -mustache-commonjs/LICENSE -mustache-commonjs/README.md -mustache-commonjs/examples/comments.html -mustache-commonjs/examples/comments.js -mustache-commonjs/examples/comments.txt -mustache-commonjs/examples/complex.html -mustache-commonjs/examples/complex.js -mustache-commonjs/examples/complex.txt -mustache-commonjs/examples/delimiters.html -mustache-commonjs/examples/delimiters.js -mustache-commonjs/examples/delimiters.txt -mustache-commonjs/examples/escaped.html -mustache-commonjs/examples/escaped.js -mustache-commonjs/examples/escaped.txt -mustache-commonjs/examples/simple.html -mustache-commonjs/examples/simple.js -mustache-commonjs/examples/simple.txt -mustache-commonjs/examples/template_partial.html -mustache-commonjs/examples/template_partial.js -mustache-commonjs/examples/template_partial.txt -mustache-commonjs/examples/unescaped.html -mustache-commonjs/examples/unescaped.js -mustache-commonjs/examples/unescaped.txt -mustache-commonjs/examples/view_partial.html -mustache-commonjs/examples/view_partial.js -mustache-commonjs/examples/view_partial.txt -mustache-commonjs/lib/mustache.js -mustache-commonjs/test/mustache_test.js -mustache-commonjs/test/mustache_test.rb -mustache-jquery/jquery.mustache.js -mustache-jquery/LICENSE -mustache-jquery/README.md -mustache-jquery/examples/ -mustache-jquery/test/ +lib +jquery.mustache.js diff --git a/Rakefile b/Rakefile index 5053bb0..7d06397 100644 --- a/Rakefile +++ b/Rakefile @@ -12,27 +12,18 @@ desc "Run all specs" task :spec do end - task :commonjs do print "Packaging for CommonJS\n" - target = "mustache-commonjs" - copy_distfiles(target); - `mkdir #{target}/lib` - `cp mustache.js #{target}/lib` - print "Done, see ./#{target}\n" + `mkdir lib` + `cp mustache.js lib/mustache.js` + print "Done.\n" end task :jquery do print "Packaging for jQuery\n" - target = "mustache-jquery/" - target_jq = "#{target}/jquery.mustache.js" - `cat #{target_jq}.tpl.pre mustache.js #{target_jq}.tpl.post > #{target_jq}` - copy_distfiles(target); - print "Done, see ./#{target}\n" + source = "mustache-jquery" + target_jq = "jquery.mustache.js" + `cat #{source}/#{target_jq}.tpl.pre mustache.js #{source}/#{target_jq}.tpl.post > #{target_jq}` + print "Done, see ./#{target_jq}\n" end -private -def copy_distfiles(target) - files = "LICENSE README.md test examples" - `cp -r #{files} #{target}` -end