Skip to content

Commit

Permalink
move jQuery and CommonJS packages to the top level
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Lehnardt committed Oct 20, 2009
1 parent bc87107 commit 7e791ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 50 deletions.
36 changes: 2 additions & 34 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
23 changes: 7 additions & 16 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7e791ed

Please sign in to comment.