You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
531B

  1. require 'rake'
  2. require 'rake/testtask'
  3. task :default => :test
  4. task :test do
  5. Rake::TestTask.new do |t|
  6. Dir.glob("examples/*.html") do |file|
  7. test = File.basename(file, ".html")
  8. cmd = "ruby test/mustache_test.rb #{test}"
  9. print `#{cmd}`
  10. end
  11. end
  12. end
  13. task :commonjs do
  14. print "Packaging for CommonJS\n"
  15. target = "mustache-commonjs"
  16. files = "LICENSE README.md test examples"
  17. `cp -r #{files} #{target}`
  18. `mkdir #{target}/lib`
  19. `cp mustache.js #{target}/lib`
  20. print "Done, see ./#{target}\n"
  21. end